Skip to content

Commit

Permalink
Fix warning in fast_neural_style example (#2984)
Browse files Browse the repository at this point in the history
* Update examples/fast_neural_style/vgg.py

* Update examples/fast_neural_style/vgg.py

* Update vgg.py

---------

Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
  • Loading branch information
sweep-ai[bot] and vfdev-5 authored Jul 7, 2023
1 parent 35a2da3 commit 9519e9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/fast_neural_style/vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import torch
from torchvision import models
from torchvision.models.vgg import VGG16_Weights


class Vgg16(torch.nn.Module):
def __init__(self, requires_grad=False):
super(Vgg16, self).__init__()
vgg_pretrained_features = models.vgg16(pretrained=True).features
vgg_pretrained_features = models.vgg16(weights=VGG16_Weights.IMAGENET1K_V1).features
self.slice1 = torch.nn.Sequential()
self.slice2 = torch.nn.Sequential()
self.slice3 = torch.nn.Sequential()
Expand Down

0 comments on commit 9519e9d

Please sign in to comment.