Skip to content

Commit

Permalink
Set default activation to tanh, fixes Set default activation of commi…
Browse files Browse the repository at this point in the history
…ttor model back to tanh #138
  • Loading branch information
EnricoTrizio committed Jun 12, 2024
1 parent 8313673 commit 84de48d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mlcolvar/cvs/committor/committor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def __init__(
# ======= BLOCKS =======
# initialize NN turning
o = "nn"
# set default activation to tanh
if "activation" not in options[o]:
options[o]["activation"] = "tanh"
self.nn = FeedForward(layers, **options[o])

# separately add sigmoid activation on last layer, this way it can be deactived
Expand Down Expand Up @@ -127,7 +130,6 @@ def test_committor():

atomic_masses = initialize_committor_masses(atoms_map=[[1,1]], n_dims=2)
model = Committor(layers=[2, 4, 2, 1], mass=atomic_masses, alpha=1e-1, delta_f=0)

# create dataset
samples = 50
X = torch.randn((2*samples, 2))
Expand Down

0 comments on commit 84de48d

Please sign in to comment.