You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for good service. I found some error trying using this code.
Traceback (most recent call last):
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/main.py", line 309, in
main(config)
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/main.py", line 237, in main
aggr_metrics_val, best_metrics, best_value = validate(val_evaluator, tensorboard_writer, config, best_metrics,
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/running.py", line 222, in validate
np.savez(pred_filepath, **per_batch)
File "<array_function internals>", line 200, in savez
File "/home/work/.local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 615, in savez
_savez(file, args, kwds, False)
File "/home/work/.local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 716, in _savez
val = np.asanyarray(val)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
It's the result of run 'bash .scripts/Heartbeat.sh'
As the error code states, I cannot proceed to the next step after epoch 0, because I have error on validation after training epoch 0. Could anyone help us?
The text was updated successfully, but these errors were encountered:
It looks like the error you're encountering happens when trying to save arrays using np.savez during validation. Specifically, the issue is caused by trying to save a variety with inconsistent dimensions (an inhomogeneous shape).
The detected shape (4,) + inhomogeneous part suggests that one or more elements of the array are sequences (e.g., lists or arrays) that don't have the same length or shape, making it difficult for NumPy to handle them as a single array.
To fix this, you might want to ensure that the data you're passing into np.savez has a consistent shape. You can either:
1- Check the data passed in per_batch and ensure each item has the exact dimensions.
2- If the data is inherently different in shape (e.g., a list of varying-length arrays), you could either pad or truncate the arrays to match dimensions or save each element separately rather than combining them.
Thanks for good service. I found some error trying using this code.
Traceback (most recent call last):
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/main.py", line 309, in
main(config)
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/main.py", line 237, in main
aggr_metrics_val, best_metrics, best_value = validate(val_evaluator, tensorboard_writer, config, best_metrics,
File "/home/work/.LVEF/ecg-lvef-prediction/NeurIPS2023-One-Fits-All/Classification/src/running.py", line 222, in validate
np.savez(pred_filepath, **per_batch)
File "<array_function internals>", line 200, in savez
File "/home/work/.local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 615, in savez
_savez(file, args, kwds, False)
File "/home/work/.local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 716, in _savez
val = np.asanyarray(val)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
It's the result of run 'bash .scripts/Heartbeat.sh'
As the error code states, I cannot proceed to the next step after epoch 0, because I have error on validation after training epoch 0. Could anyone help us?
The text was updated successfully, but these errors were encountered: