admin管理员组文章数量:1550528
问题描述:NotImplementedError: Cannot convert a symbolic Tensor (LSTM/strided_slice:0) to a numpy array.This error may indicate that you’re trying to pass a Tensor to a NumPy call, which is not supported
错误分析:无法将一个张量传进numpy array,经过多方查询,是因为tensorflow的版本与numpy版本不一致导致的,我使用的tensorflow版本是2.4.0 对应的numpy应该为1.19.5
首先现在原本的numpy
pip uninstall numpy
然后安装正确的numpy
pip install numpy==1.19.5
但当我安装好新的numpy后 报了这个错误:
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject
错误分析:TA_Lib版本与numpy版本不一致导致的,我使用的原来的版本是talib 0.4.21 是最新版,版本换成0.4.19即可,安装talib的时候可能用pip install 会出现红色错误,这里建议直接从网上下载whl进行本地安装
本文标签: SymbolicTensorNotImplementedErrorConvertnumpy
版权声明:本文标题:NotImplementedError: Cannot convert a symbolic Tensor (LSTMstrided_slice:0) to a numpy array 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1727248665a1104954.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论