tensorflow2.报错与解决 Cannot convert a symbolic Tensor
Posted 炫云云
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tensorflow2.报错与解决 Cannot convert a symbolic Tensor相关的知识,希望对你有一定的参考价值。
问题
TensorFlow2.4.1(Macbook m1 conda-forge)报错:
NotImplementedError: Cannot convert a symbolic Tensor
(sequential/simple_rnn/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版本过高,conda安装指定版本的numpy,1.19.5即可解决问题
conda install numpy=1.19.5 -c conda-forge
以上是关于tensorflow2.报错与解决 Cannot convert a symbolic Tensor的主要内容,如果未能解决你的问题,请参考以下文章
Tensorflow2.0报错:ProfilerNotRunningError: Cannot stop profiling. No profiler is running.(修改后别忘了重启内核或关