Open CaiTH0618 opened 1 year ago
I met the same problem. My numpy version is 1.24.4.
The error information is: AttributeError: module 'numpy' has no attribute 'long'
same problem, it seams that you can solve it by downgrade numpy by 1.23.5. ( or maybe under 1.24)
You can find the File "/home/cai/.local/lib/python3.10/site-packages/torchstat/model_hook.py", line 65, in wrap_call and this line of code np.array([parameter_quantity], dtype=np.long))
change dtype=np.long
to dtype=np.int64
or dtype=np.int32
or dtype=np.int_
. I don't think changing this will cost any problem.
numpy.long
was deprecated in numpy 1.20 and removed in numpy 1.24.
To resolve it, you can roll back to a previous version using the following command:
pip install numpy==1.23
I am using method
stat
and it raises an ERROR: "AttributeError: module 'numpy' has no attribute 'long'. Did you mean: 'log'?".My numpy version is
1.26.0
The error information is: