Skip to content

Commit

Permalink
Cast nn.Upsample.scale_factor to a float (#17732)
Browse files Browse the repository at this point in the history
Summary:
Fixes #17106
Pull Request resolved: #17732

Differential Revision: D14388192

Pulled By: driazati

fbshipit-source-id: d9c9e87a7c6db63c1de3ddebbb8dcf619f0dc34d
  • Loading branch information
David Riazati authored and facebook-github-bot committed Mar 8, 2019
1 parent 4bea15f commit 0955592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/nn/modules/upsampling.py
Expand Up @@ -126,7 +126,7 @@ def __init__(self, size=None, scale_factor=None, mode='nearest', align_corners=N
super(Upsample, self).__init__()
self.name = type(self).__name__
self.size = size
self.scale_factor = scale_factor
self.scale_factor = float(scale_factor) if scale_factor else None
self.mode = mode
self.align_corners = align_corners

Expand Down

0 comments on commit 0955592

Please sign in to comment.