报错:
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
查了其他大佬的tips,发现是numpy版本过高的问题,只要降低版本就可以。
其他博主是安装numpy~=1.19.5版本,但是因为我是Python3.8.0版本,因此直接重装了tensorflow。
pip install tensorflow-gpu~=2.4.1
然后keras和numpy也自动重装了,Keras~=2.4.3,numpy~=1.19.5。就没有再报错了。
https://blog.youkuaiyun.com/qq_34489091/article/details/121117702?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166367265016782428656446%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=166367265016782428656446&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-121117702-null-null.142^v48^new_blog_pos_by_title,201^v3^control_1&utm_term=NotImplementedError%3A%20Cannot%20convert%20a%20symbolic%20Tensor%20%28lstm%2Fstrided_slice%3A0%29%20to%20a%20numpy%20array.%20This%20error%20may%20indicate%20that%20youre%20trying%20to%20pass%20a%20Tensor%20to%20a%20NumPy%20call%2C%20which%20is%20not%20supported&spm=1018.2226.3001.4187
2677

被折叠的 条评论
为什么被折叠?



