Skip to content

Commit

Permalink
modified: test_models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern committed Feb 7, 2024
1 parent 442fb68 commit 5c2d90e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py21cmnet/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_autoencoder():
info = utils.train(model, dl, torch.nn.MSELoss(reduction='mean'), torch.optim.Adam,
optim_kwargs=dict(lr=0.1), Nepochs=3, verbose=True)
# assert loss decreases
assert (np.diff(info['train_loss'].detach().numpy()) < 0).all()
assert (np.diff(torch.stack(info['train_loss']).detach().numpy()) < 0).all()

# pred = model(X)
# import matplotlib.pyplot as plt;
Expand Down

0 comments on commit 5c2d90e

Please sign in to comment.