In the ‘lesson7-superres-imagenet’ notebook, there is a line in the FeatureLoss class:

`self.feat_losses += [base_loss(gram_matrix(f_in), gram_matrix(f_out))*w**2 * 5e3 for f_in, f_out, w in zip(in_feat, out_feat, self.wgts)]`

Why multiply by 5e3?

In the ‘lesson7-superres-imagenet’ notebook, there is a line in the FeatureLoss class:

`self.feat_losses += [base_loss(gram_matrix(f_in), gram_matrix(f_out))*w**2 * 5e3 for f_in, f_out, w in zip(in_feat, out_feat, self.wgts)]`

Why multiply by 5e3?

I’d like to know this too! Did anyone get what that part of code is doing? Why is he multiplying it with weights^2 ?

My understanding is that this line has to do with the use of ‘gram loss’ Which is explained in part2 lesson 13 (Link to some notes). Notice how rather than using base_loss() he calls base_loss(gram_matrix() ).

Hope this helps, I’m just finishing lesson 9 so someone else might be able to help more. It looks like those notes were pretty good and I bet the video for lesson 13 will have good insights too.