Closed leoluopy closed 4 years ago
@leoluopy Hello,
"torch.no_grad" is not necessary. Since the teacher model is already forwarded in the context of "torch.no_grad"
with torch.no_grad():
t_b1, t_b2, t_b3, t_b4, t_pool, t_e = teacher(teacher_normalize(images), True)
Hi, glad to see u , i am reading your loss design now , and found code below ` class RKdAngle(nn.Module): def forward(self, student, teacher):
N x C
` both in rkd angle and rkd distance , there is a " torch.no_grad" in teacher related code . is that essential ? can that be removed ?