model.fit()错误:
ValueError: Layer “model” expects 2 input(s), but it received 1 input tensors. Inputs received: [<tf.Tensor ‘IteratorGetNext:0’ shape=(8, 100, 236, 1) dtype=float32>]
如果是本来没问题的代码出现类似错误,是tensorflow版本问题:
import tensorflow as tf
改为:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()