Skip to content

Commit

Permalink
Fix weight initialization on neural_style_tutorial (#2673)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
  • Loading branch information
alperenunlu and NicolasHug authored Nov 14, 2023
1 parent dc448c2 commit 47dd4bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions advanced_source/neural_style_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import matplotlib.pyplot as plt

import torchvision.transforms as transforms
import torchvision.models as models
from torchvision.models import vgg19, VGG19_Weights

import copy

Expand Down Expand Up @@ -262,7 +262,7 @@ def forward(self, input):
# network to evaluation mode using ``.eval()``.
#

cnn = models.vgg19(pretrained=True).features.eval()
cnn = vgg19(weights=VGG19_Weights.DEFAULT).features.eval()



Expand Down

0 comments on commit 47dd4bc

Please sign in to comment.