pytorch lstm输入参数
2019-09-21 本文已影响0人
追求科技的足球
参数:

input_size:输入特征的数目
hidden_size:隐层的特征数目
num_layers:这个是模型集成的LSTM的个数 记住这里是模型中有多少个LSTM摞起来 一般默认就1个
bias:用不用偏置 默认是用
batch_first:默认为假 若为真,则输入、输出的tensor的格式为(batch , seq , feature)
即[batch_size, time_step, input_size] 【batch大小,序列长度,特征数目】
dropout:默认0 若非0,则为dropout率
bidirectional:是否为双向LSTM 默认为否