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了。

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