Skip to content

Commit bb3771b

Browse files
author
Maximilian Seitzer
committed
Switch to interpolate because upsample is deprecated
1 parent 40e7e26 commit bb3771b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

inception.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,22 @@ def forward(self, inp):
110110
Parameters
111111
----------
112112
inp : torch.autograd.Variable
113-
Input tensor of shape Bx3xHxW. Values are expected to be in
113+
Input tensor of shape Bx3xHxW. Values are expected to be in
114114
range (0, 1)
115115
116116
Returns
117117
-------
118-
List of torch.autograd.Variable, corresponding to the selected output
118+
List of torch.autograd.Variable, corresponding to the selected output
119119
block, sorted ascending by index
120120
"""
121121
outp = []
122122
x = inp
123123

124124
if self.resize_input:
125-
x = F.upsample(x, size=(299, 299), mode='bilinear')
125+
x = F.interpolate(x,
126+
size=(299, 299),
127+
mode='bilinear',
128+
align_corners=False)
126129

127130
if self.normalize_input:
128131
x = x.clone()

0 commit comments

Comments
 (0)