Skip to content

Commit 5520ebe

Browse files
authored
Merge pull request #9 from 1nadequacy/master
F.tanh -> torch.tanh
2 parents e679e05 + 3bd1fd1 commit 5520ebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def forward(self, inputs, cond_inputs=None, mode='direct'):
107107
a = self.t_trunk(h)
108108

109109
if self.pre_exp_tanh:
110-
a = F.tanh(a)
110+
a = torch.tanh(a)
111111

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

124124
if self.pre_exp_tanh:
125-
a = F.tanh(a)
125+
a = torch.tanh(a)
126126

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

0 commit comments

Comments
 (0)