pytorch / ignite

High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.
https://pytorch-ignite.ai
BSD 3-Clause "New" or "Revised" License
4.5k stars 608 forks source link

Fixed test pearson metric issue with old pytorch versions #3225

Closed vfdev-5 closed 3 months ago

vfdev-5 commented 3 months ago

Description:

  np_y = y.ravel().numpy()

E AttributeError: 'Tensor' object has no attribute 'ravel'

tests/ignite/metrics/regression/test_pearson_correlation.py:123: AttributeError



cc @kzkadc 

Restarted GHA PyTorch versions tests on this PR: https://github.com/pytorch/ignite/actions/runs/8505830753
- 1.5.1 is passing and others are failing due to https://github.com/pytorch/ignite/pull/3226