Skip to content

Commit

Permalink
using torch.nn instead of nn
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcleigh authored Nov 30, 2023
1 parent 6e51e62 commit ba5760a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions normflows/flows/neural_spline/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def transform_net_create_fn(in_features, out_features):
use_batch_norm=False,
)
if init_identity:
nn.init.constant_(net.final_layer.weight, 0.0)
nn.init.constant_(
torch.nn.init.constant_(net.final_layer.weight, 0.0)
torch.nn.init.constant_(
net.final_layer.bias, np.log(np.exp(1 - DEFAULT_MIN_DERIVATIVE) - 1)
)
return net
Expand Down

0 comments on commit ba5760a

Please sign in to comment.