这是网络结构的一部分:
inputs = Input(shape=(time_step, dim))
lstm_out = LSTM(5, return_sequen`enter code here`ces=True)(inputs)
print(lstm_out)
attention_mul = attention_3d_block(inputs)
attention_flatten = Flatten()(attention_mul)
output = Dense(1, activation='linear')(attention_flatten)
model = Model(inputs=inputs, outputs=output)
Adam = optimizers.Adam(lr=0.001)我想尝试打印LSTM层的结果值:" print (lstm_out)“
但是它给了我.:KerasTensor(type_spec=TensorSpec(shape=(None,3,5),dtype=tf.float32,name=None),name='lstm/PartitionedCall:1',description=“由层‘lstm’创建的)
我只想得到“价值”
请给我一些建议
发布于 2022-03-10 10:00:07
你试过使用tf.print吗?
(对不起,我没有足够的声誉来发表评论)
https://stackoverflow.com/questions/71421727
复制相似问题