为什么在ConvLSTM中设置return_sequence = False时会出现错误? [英] Why in ConvLSTM when setting return_sequence = False you get an error?

查看:171
本文介绍了为什么在ConvLSTM中设置return_sequence = False时会出现错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过附加的三层ConvLSTM进行建模,但是当我在第一个ConvLSTM中进行设置时,return_sequence = False程序将无法运行.

I have tried to model by attached three layer of ConvLSTM but when I set in the first ConvLSTM return_sequence = False program won't run.

查看型号摘要 模型摘要

在第一个ConvLSTM层中设置return_sequence = True之后,模型运行,但是如果我设置return_sequence = False,则程序将无法运行

The model run after I set return_sequence = True in first ConvLSTM layer but if I set return_sequence = False program won't run

ConvLSTM最后一层的第二部分,当return_sequence = False时,输出尺寸从5更改为4,而时间步长消失了,为什么会这样?

The second part in last layer of ConvLSTM when return_sequence=False the output dimension change from 5 to 4 with timestep dimension disappear, why this happened?

推荐答案

如果return_sequence为true,则表示LSTM层将返回输出的完整序列,而不仅仅是最终输出.因此,下一层的输入仍然是时间序列,这也意味着下一层必须是RNN才能处理时间序列.

If return_sequence is true, it means the LSTM layer will return the full sequence of the output not only the final output. So the input of next layer is still time sequence, it also means the next layer MUST be RNN to handle time sequence.

如果return_sequence为false,则意味着LSTM层将仅返回最终输出,而不再是时间序列.因此尺寸将减小一.对于您的示例,它将从5更改为4.由于下一层的输入不再是时间序列,因此下一层一定不再是RNN.

If return_sequence is false, it means the LSTM layer will ONLY return the final output, which is not a time sequence any more. So the dimension will be reduced one. For your example, it will be changed from 5 to 4. And because the input for next layer is not time sequence anymore, the next layer MUST NOT be RNN any more.

这篇关于为什么在ConvLSTM中设置return_sequence = False时会出现错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆