We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35a2da3 commit 9519e9dCopy full SHA for 9519e9d
examples/fast_neural_style/vgg.py
@@ -2,12 +2,13 @@
2
3
import torch
4
from torchvision import models
5
+from torchvision.models.vgg import VGG16_Weights
6
7
8
class Vgg16(torch.nn.Module):
9
def __init__(self, requires_grad=False):
10
super(Vgg16, self).__init__()
- vgg_pretrained_features = models.vgg16(pretrained=True).features
11
+ vgg_pretrained_features = models.vgg16(weights=VGG16_Weights.IMAGENET1K_V1).features
12
self.slice1 = torch.nn.Sequential()
13
self.slice2 = torch.nn.Sequential()
14
self.slice3 = torch.nn.Sequential()
0 commit comments