Closed Mona77 closed 6 years ago
Hi, Thanks for sharing your code publicly. In your implementation style_loss is summation of mean_square_error of mean and std, this line.
self.mean_loss = self.mean_criterion:forward(self.input_mean, self.target_mean)
But may I ask why you have normalized this value by batch size?
self.mean_loss = self.mean_loss / N -- normalized w.r.t. batch size
Wouldn't MSE criteria take average over N and C?
Hi, the mean_criterion has sizeAverage set to False, so it's not normalized by batch size at the first place.
Hi, Thanks for sharing your code publicly. In your implementation style_loss is summation of mean_square_error of mean and std, this line.
self.mean_loss = self.mean_criterion:forward(self.input_mean, self.target_mean)
But may I ask why you have normalized this value by batch size?
self.mean_loss = self.mean_loss / N -- normalized w.r.t. batch size
Wouldn't MSE criteria take average over N and C?