天天看點

np.zeros的問題&&python錯誤:TypeError: Cannot interpret ‘3‘ as a data type

跑模型的時候出現了類似的錯誤:

np.zeros的問題&&python錯誤:TypeError: Cannot interpret ‘3‘ as a data type

 錯誤:無法将3當作一個資料類型,那麼我們可以知道肯定是缺少了參數,檢視np.ones的參數如下:

np.zeros的問題&&python錯誤:TypeError: Cannot interpret ‘3‘ as a data type

 改為這樣就可以了: c = np.ones((2,3,4))

下一篇: Linux安裝Cacti