If possible, start attending from the beginning, just so the teacher gets used to seeing your face in the crowd (if it's a smaller class).
Also, most schools have their class schedules online, so just look that up and go. If the teacher calls you out on it, just be straight up. Tell them you're interested in the subject and are just there to learn. Unless if the teacher is an absolute douche, that should be a breath of fresh air to actually have someone there who truly wants to learn, as opposed to most kids who are just there because they have to be there and are not engaged at all.
Also, most schools have their class schedules online, so just look that up and go. If the teacher calls you out on it, just be straight up. Tell them you're interested in the subject and are just there to learn. Unless if the teacher is an absolute douche, that should be a breath of fresh air to actually have someone there who truly wants to learn, as opposed to most kids who are just there because they have to be there and are not engaged at all.