【发布时间】:2021-02-07 05:51:42
【问题描述】:
我的模型有这个简单的层
states = Input(shape=(len(inputFinal),))
这应该会生成一个 (328,None) 但不知道为什么当我检查倒置时
model.inputs
[<tf.Tensor 'input_1:0' shape=(None, 328) dtype=float32>]
当我尝试将数据传递给模型时,图层不正确
value.shape
(328,)
model.predict(value)
Input 0 of layer dense is incompatible with the layer: expected axis -1 of input shape to have value 328 but received input with shape [None, 1]
我找不到问题,有什么想法吗?
【问题讨论】:
标签: python tensorflow keras keras-layer tf.keras