Closed chacorp closed 1 year ago
Link to tutorial: https://pytorch.org/tutorials/advanced/neural_style_tutorial.html
/assigntome
Hello,
This example actually works fine. https://github.com/pytorch/pytorch/pull/22576 added the requires_grad_
function for nn.Module
as well. Does it still make sense to change to model.eval()
?
Thanks
Hi, thanks for the all those easy tutorials!
recently i've run the tutorial codes for Neural style transfer and got an error like this
Since it was optimizing the input not the model, I changed the code "model.requiresgrad(False)" in run_style_transfer function to "model.eval()". And then it worked out fine!
i'm not sure if I changed it right, But I think this part should be modified in the code!