MetaDistil icon indicating copy to clipboard operation
MetaDistil copied to clipboard

Teacher could not acquire grads from student's cross entropy loss

Open TheBobbyliu opened this issue 3 years ago • 0 comments

According to the article, in the second step, we calculate CrossEntropy loss of S' on samples from a separate quiz set, and then calculate the gradients of CE loss with respect to the parameters of teacher. The problem is, teacher's parameters seem to be not related to student's loss, so when I run the code of meta_loops.py, in line 115: t_grads = torch.autograd.grad(s_prime_loss, t_model.parameters()) I only get None for all grads of teacher's parameters.

TheBobbyliu avatar Sep 23 '22 03:09 TheBobbyliu