TypeError: object of type class numpy.float64 cannot be safely interpreted as an integer.

运行别人在pytorch上实现的目标检测模型Faster-RCNN时,突然报了这个错误:
TypeError: object of type <class ‘numpy.float64’> cannot be safely interpreted as an integer.

查看了一下自己的numpy版本,发现是1.18.1,可能是版本过新的问题,所以尝试将numpy版本降到1.16。

pip install numpy==1.16

就OK了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章