Skip to content

Commit

Permalink
replaced deprecated layer
Browse files Browse the repository at this point in the history
  • Loading branch information
jingweiz committed Aug 28, 2017
1 parent 34edece commit 79edb65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_style/transformer_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, in_channels, out_channels, kernel_size, stride, upsample=None
super(UpsampleConvLayer, self).__init__()
self.upsample = upsample
if upsample:
self.upsample_layer = torch.nn.UpsamplingNearest2d(scale_factor=upsample)
self.upsample_layer = torch.nn.Upsample(scale_factor=upsample)
reflection_padding = int(np.floor(kernel_size / 2))
self.reflection_pad = nn.ReflectionPad2d(reflection_padding)
self.conv2d = nn.Conv2d(in_channels, out_channels, kernel_size, stride)
Expand Down

0 comments on commit 79edb65

Please sign in to comment.