Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style loss: MSE or SSE #6

Open
Mona77 opened this issue Mar 19, 2018 · 2 comments
Open

Style loss: MSE or SSE #6

Mona77 opened this issue Mar 19, 2018 · 2 comments

Comments

@Mona77
Copy link

Mona77 commented Mar 19, 2018

Hi, I was wondering why you have calculated sum of squared in style loss calculations:

m_loss = sse(d_mean, s_mean) / batch_size # normalized w.r.t. batch size

While in torch implementation MSE is being used, this line:

self.mean_criterion = nn.MSECriterion() self.mean_loss = self.mean_criterion:forward(self.input_mean, self.target_mean)

@eridgd
Copy link
Owner

eridgd commented Mar 19, 2018

It's been too long for me to remember exactly why I implemented things the way I did, but my guess is it's a mistake. The results do still seem to be comparable to the Torch version, but at some point I'll retrain with MSE and see how it affects the output. Good catch!

@Mona77
Copy link
Author

Mona77 commented Mar 20, 2018

@eridgd, I confirm that. I trained your network as it is, and the results are very similar to the Torch version.
Please let me know. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants