Skip to content

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

@TheBobbyliu

Description

@TheBobbyliu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions