tensorflow 2.4.1 & numpy 1.20.3 & Python 3.8.12 ubuntu conda 中出现 NotImplementedError

问题描述 投票:0回答:1

添加输入层和 LSTM 层

model.add(LSTM(units = 4, activation = 'sigmoid', input_shape = (None, 1)))

错误:

NotImplementedError: Cannot convert a symbolic Tensor (lstm_1/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
python python-3.x numpy tensorflow keras
1个回答
0
投票

如果您需要使用 TensorFlow,请将您的 Numpy 版本降级为

1.19.2
1.19.5
2.4

© www.soinside.com 2019 - 2024. All rights reserved.