Skip to content

Commit

Permalink
Merge pull request #9 from 1nadequacy/master
Browse files Browse the repository at this point in the history
F.tanh -> torch.tanh
  • Loading branch information
ikostrikov2 authored Mar 17, 2019
2 parents e679e05 + 3bd1fd1 commit 5520ebe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def forward(self, inputs, cond_inputs=None, mode='direct'):
a = self.t_trunk(h)

if self.pre_exp_tanh:
a = F.tanh(a)
a = torch.tanh(a)

u = (inputs - m) * torch.exp(-a)
return u, -a.sum(-1, keepdim=True)
Expand All @@ -122,7 +122,7 @@ def forward(self, inputs, cond_inputs=None, mode='direct'):
a = self.t_trunk(h)

if self.pre_exp_tanh:
a = F.tanh(a)
a = torch.tanh(a)

x[:, i_col] = inputs[:, i_col] * torch.exp(
a[:, i_col]) + m[:, i_col]
Expand Down

0 comments on commit 5520ebe

Please sign in to comment.