报错:FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated

Myth丶恋晨 2023-07-10 08:24 106阅读 0赞

FutureWarning: Passing (type, 1) or ‘1type’ as a 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)])

  • 原因:安装的tensorflow版本和numpy版本不匹配。需要将numpy降版本。
    我的tensorflow版本: ‘1.12.0’,numpy版本“1.18.0”报错,我将numpy降为1.16.0不报错
  1. 方法一:终端:重新下载numpy

    pip install numpy==1.16.0

  2. 方法二:如果有anaconda,可以在界面降级:
    在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,106人围观)

还没有评论,来说两句吧...

相关阅读