Skip to content

Commit

Permalink
hotfix for pytorch 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rtqichen committed Nov 15, 2018
1 parent 220c634 commit e467dbb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/odenet_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def __init__(self, odefunc):
self.integration_time = torch.tensor([0, 1]).float()

def forward(self, x):
self.integration_time = self.integration_time.type_as(x)
out = odeint(self.odefunc, x, self.integration_time, rtol=args.tol, atol=args.tol)
return out[1]

Expand Down

0 comments on commit e467dbb

Please sign in to comment.