numpy,dtype問題解決

百度後的結果:修改/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py文件

 

dtypes.py", line 499 _np_qint8 = np.dtype([("qint8", np.int8, (1,)])

# Numpy representation for quantized dtypes.

#

# These are magic strings that are used in the swig wrapper to identify

# quantized types.

# TODO(mrry,keveman): Investigate Numpy type registration to replace this

# hard-coding of names.

#_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_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,))])

 

# Custom struct dtype for directly-fed ResourceHandles of supported type(s).

#np_resource = np.dtype([("resource", np.ubyte, 1)])

np_resource = np.dtype([("resource", np.ubyte, (1,))])

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