Comments (4)
Hi @UtopiaHu,
Thanks for the question. Actually it doesn't matter whether you do the former or you do the latter. MSE stands for Mean Square of Error aka Mean of Square of Differences. The square of (generated - content) should be equal to the square of (content - generated).
from fast-neural-style-pytorch.
Hi, @rrmina ,
Thank you for your reply.
The former will raise the following error:
AssertionError: nn criterions don't compute the gradient w.r.t. targets - please mark these tensors as not requiring gradients.
My pytorch version is 0.4.0.
from fast-neural-style-pytorch.
I see. I do not recall having that problem in versions 0.4.1 and 1.0.1. Seeing now the assertion error, you might be right. Technically they should be equal but by convention, the latter is the correct one.
Thanks for reporting. I'll update the codes to reflect the suggested changes. :)
from fast-neural-style-pytorch.
Hi, I have another question.
When initializing the VGG network, all the parameters are set to have the attributes of requries_grad=false, which means the gradients of VGG losses with respect to the VGG parameters will not be calculated after the backward() function is called, according to my understand. Then, how do the VGG losses propagate back to the output and the intermediate layers of the transformer net? I think if we want to update the transformer net, the VGG losses should go backward to update the parameters. Maybe I missed something about how pytorch works.
Thanks! :-)
from fast-neural-style-pytorch.
Related Issues (20)
- vgg16_features.load_state_dict(torch.load(vgg_path), strict=False) HOT 4
- "AttributeError: can't set attribute" HOT 2
- VGG weight file not available on AWS HOT 4
- How to run stylize.py HOT 3
- IndentationError
- Value error while trying to run video.py HOT 9
- Custom model HOT 1
- train my own style image HOT 2
- Share style images? HOT 1
- video.py wrong line
- Trying TransformerNetworkTanh and error when running train.py HOT 1
- What is the License schema ? HOT 2
- Difference between this implementation and PyTorch team's version? HOT 1
- Train Notebook: Request for Improvements HOT 3
- Fixing the save/load generated images HOT 3
- Can you share the pre-trained model? HOT 3
- webcam.py: can't adjust resolution? HOT 3
- new style image HOT 2
- I cannot find 'USE_FFMPEG' in video.py. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-neural-style-pytorch.