LSTM:timestep,batchsize
YUAN1594795423:
一个timestep中输出对应序列还是输出一个值呀?
LSTM输入结构
Jacskon0307:
首先在最开始就写的不是很清楚,为什么在同一个时间点上会有3个城市的样本? 没说明白。。。 我认为应该是一个城市的在不同时间端的样本作为一个小样本的输入,多个小样本成为的一个大样本
LSTM输入结构
星辰大海里的chen啊:
H、C的格式不会变(至少在自己的程序中定义的时候)
可以参考pytorch文档(https://pytorch.org/docs/stable/generated/torch.nn.LSTM.html?highlight=torch+nn+lstm#torch.nn.LSTM)
batch_first – If True, then the input and output tensors are provided as (batch, seq, feature) instead of (seq, batch, feature). Note that this does not apply to hidden or cell states. See the Inputs/Outputs sections below for details
LSTM输入结构
Liekkas Kono:
感谢博主,指出一个小问题
[code=python]
x, (ht,ct) = self.rnn(x)
seq_len, batch_size, hidden_size= x.shape
x = y.view(-1, hidden_size) # 这里y应该是x
x = self.reg(x)
x = x.view(seq_len, batch_size, -1)
[/code]
LSTM输入结构
TJIsir:
这是我见过最好的输入输出讲解!