Skip to content

Commit

Permalink
Fixed test pearson metric issue with old pytorch versions (#3225)
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored Apr 1, 2024
1 parent 070b71a commit 216b348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ignite/metrics/regression/test_pearson_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def update_fn(engine: Engine, batch):
m = PearsonCorrelation()
m.attach(engine, "corr")

np_y = y.ravel().numpy()
np_y_pred = y_pred.ravel().numpy()
np_y = y.numpy().ravel()
np_y_pred = y_pred.numpy().ravel()

data = list(range(y_pred.shape[0] // batch_size))
corr = engine.run(data, max_epochs=1).metrics["corr"]
Expand Down

0 comments on commit 216b348

Please sign in to comment.