Thanks for the code!
How about the setting of voc to clipart, and can you share the config file? When I run the adaptive teacher on the the setting of voc to clipart, it often occurs to nan and diverge. Have you encountered this problem and how did you solve it?