運行keras出現 FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy,
原則來說,沒啥影響,還是能運行,但是看著難受
解決辦法:
點擊藍色的鏈接:
進入
根據每個報錯的藍色鏈接,你會發現都是這種:
把里面的1 改成(1,)
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
_np_qint32 = np.dtype([("qint32", np.int32, 1)])np_resource = np.dtype([("resource", np.ubyte, 1)])
然后退出,運行原文件
完美解決~
參考解決python調用TensorFlow時出現FutureWarning: Passing (type, 1) or ‘1type’
as a synonym of type is
deprecate