我正试图通过keras函数API构建一个网络,提供两个列表,其中包含LSTM层和FC (密集)层的单元数。我想分析20个连续段(批),其中包含fs时间步骤和2个值(每个时间步骤2个特性)。(shape(Rec)[0]): if i == shape(Rec)[0]-1:
return_state_bool(shape(FC)[0]):
,我会发现一些错误:
警告:tensorflow:模型是为输入张量(“input_1:0”,shape=(None,28,28,1),dtype=float32)构造的,但它是对形状不兼容的输入(NoneValueError: Input 0 of layer dense_12 is incompatible with the layer: expected axis -1 of input <e
我正在通过它的文档学习TensorFlow,并且对第一层中的input_shape类型有点困惑。有些例子有list,但通常是元组。有什么特殊的情况需要我使用某种类型的吗?# I am learning RNN and see this example.tf.keras.layers.Dense(1)# This is what I usually see
tf.keras