赞
踩
输出的最后一层ht列表。
torch.nn.LSTM(self, input_size, hidden_size, num_layers=1, bias=True, batch_first=False, dropout=0.0, bidirectional=False, proj_size=0, device=None, dtype=None)
num_layers=2
would mean stacking two LSTMs together to form a stacked LSTM, with the second LSTM taking in outputs of the first LSTM and computing the final results. Default: 1。也就是多个模型,但是多个模型的输出是stack的,也就是不拼接的。False
, then the layer does not use bias weights b_ih and b_hh. Default: True
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. Default: False
。如果设置定位True,输入也要改变,输出也会改变。dropout
. Default: 0True
, becomes a bidirectional LSTM. Default: False
。这个是会拼接的,如果选择那么输出会> 0
, will use LSTM with projections of corresponding size. Default: 0。input :
h_0:默认是0,
c_0:默认是0
output: 输出的最后一层的隐藏态。
h_0:默认是0, 所有层所有链最后的隐藏态。
c_0:默认是0,所有层所有链最后的细胞态。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。