当TensorFlow和numpy包同时运行时,由于TensorFlow和numpy的版本不匹配,导致错误的解决方法

本文讲述,当TensorFlow和numpy包同时运行时,由于TensorFlow和numpy的版本不匹配,导致错误的解决方法

错误的标志是,运行时出现如下所示的错误提示

dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.

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

在这里插入图片描述

解决方法就是:降低numpy的版本,具体操作如下;
1、打开anaconda
2、选中在install中选中numpy,如下图操作

在这里插入图片描述
以上就是本文所有内容,希望能帮到大家

发布了44 篇原创文章 · 获赞 36 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/m0_45161766/article/details/105435657