问题
model.fit错误
输入shape检查过,是对的
Traceback (most recent call last):
File "main.py", line 136, in <module>
results = model.predict(testImageSet, verbose=1)
File ".../lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/luosj/.local/lib/python3.8/site-packages/keras/engine/input_spec.py", line 216, in assert_input_compatibility
raise ValueError(
ValueError: Layer "model" expects 1 input(s), but it received 38 input tensors. Inputs received: [<tf.Tensor: shape=(32, 256, 50), dtype=float32, numpy=
array([[[0. , 0.43137255, 0.29411766, ..., 0.29803923,
0.29411766, 0.29803923],
[0. , 0.43137255, 0.29411766, ..., 0.29803923,
0.29411766, 0.29803923],
...
解决
输入不能为list,改为numpy.array