TensorFlow警告:FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate

解决办法

在警告中找到对应的路径,如本人的路径:D:\anaconda3\envs\tensorflow\Lib\site-packages\tensorflow\python\framework

进入后修改相应路径的dtype.py,把

np.dtype([("quint8", np.uint8, 1)])修改为

np.dtype([("quint8", np.uint8, (1,))])

成功解决

方法转自:https://blog.csdn.net/BigDream123/article/details/99467316

posted @ 2022-04-02 10:08  durtime  阅读(80)  评论(0)    收藏  举报