问题描述
Traceback (most recent call last): File "main_test_ircnn_denoiser.py", line 183, in main() File "main_test_ircnn_denoiser.py", line 66, in main current_idx = min(24, np.int(np.ceil(noise_level_img/2)-1)) # current_idx+1 th denoiser File "/home/visionx/anaconda3/envs/kair/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'int'.`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
解决办法
这个原因就是高版本的pytorch没有np.int方法了,所以要改为int,然后就可以了
把`np.int`改为`int`
推荐链接
您阅读本篇文章共花了:
发表评论