Skip to content

Commit 2a63d1f

Browse files
authored
Merge branch 'main' into issue2346
2 parents 60edb06 + 47dd4bc commit 2a63d1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: advanced_source/neural_style_tutorial.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
import matplotlib.pyplot as plt
5757

5858
import torchvision.transforms as transforms
59-
import torchvision.models as models
59+
from torchvision.models import vgg19, VGG19_Weights
6060

6161
import copy
6262

@@ -262,7 +262,7 @@ def forward(self, input):
262262
# network to evaluation mode using ``.eval()``.
263263
#
264264

265-
cnn = models.vgg19(pretrained=True).features.eval()
265+
cnn = vgg19(weights=VGG19_Weights.DEFAULT).features.eval()
266266

267267

268268

0 commit comments

Comments
 (0)