微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

双向 LSTM 的 Lambda 警告

如何解决双向 LSTM 的 Lambda 警告

我正在尝试实现双向 LSTM,但收到以下警告。我不太确定这意味着什么。我的模型是否仍能从传递给 LSTM 的输入中按照我的预期学习?

这是我的代码的一部分:

#First Layers
input=tf.keras.Input(shape=(n_timesteps,n_features),batch_size=batch_size,name='Input')

x1=Bidirectional(LSTM(units=32,dropout=drout,return_sequences=True),name='LSTM_1')(input)

WARNING:tensorflow:
The following Variables were used a Lambda layer's call (tf.keras.backend.rnn_58),but
are not present in its tracked objects:
  <tf.Variable 'LSTM_1/forward_lstm/lstm_cell_1/kernel:0' shape=(20,128) dtype=float32>
  <tf.Variable 'LSTM_1/forward_lstm/lstm_cell_1/recurrent_kernel:0' shape=(32,128) dtype=float32>
  <tf.Variable 'LSTM_1/forward_lstm/lstm_cell_1/bias:0' shape=(128,) dtype=float32>
It is possible that this is intended behavior,but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。