Skip to content

Commit 92bb66f

Browse files
committed
Try another recompute_scale_factor approach. Leaving it None results in insanely annoying warnings. Hopefully doesn't impact #169.
1 parent 4ef9c15 commit 92bb66f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

effdet/efficientdet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ def __init__(self,
129129
self.align_corners = None if mode == 'nearest' else align_corners
130130

131131
def forward(self, input: torch.Tensor) -> torch.Tensor:
132-
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)
132+
return F.interpolate(
133+
input, self.size, self.scale_factor, self.mode, self.align_corners, recompute_scale_factor=False)
133134

134135

135136
class ResampleFeatureMap(nn.Sequential):

0 commit comments

Comments
 (0)