Skip to content

Commit

Permalink
glow.py: inverse only exists on fp32+ data
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelvalle committed Apr 5, 2019
1 parent ff9db1d commit b1469ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glow.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def forward(self, z, reverse=False):
if reverse:
if not hasattr(self, 'W_inverse'):
# Reverse computation
W_inverse = W.inverse()
W_inverse = W.float().inverse()
W_inverse = Variable(W_inverse[..., None])
if z.type() == 'torch.cuda.HalfTensor':
W_inverse = W_inverse.half()
Expand Down

0 comments on commit b1469ee

Please sign in to comment.