keras lstm参数 中_keras LSTM中参数问题:timesteps和units

本文详细解读了Keras LSTM层中units和timesteps参数的含义。units表示输出空间的维度,影响LSTM层的输出大小。timesteps则表示输入序列的时间步长,与输入数据的形状相关。同时,介绍了Keras中time_major参数的作用,它决定了输入和输出的数据格式。
摘要由CSDN通过智能技术生成

资料来自keras源码。

关于units的源码解释如下:

units: Positive integer, dimensionality of the output space.

self.output_size = self.units

def output_size(self):

"""Integer or TensorShape: size of outputs produced by this cell."""

raise NotImplementedError('Abstract method')

outputsize的解释:

- A `state_size` attribute. This can be a single integer

(single state) in which case it is the size of the recurrent

state. This can also be a list/tuple of integers (one size per

state).

The `state_size` can also be TensorShape or tuple/list of

TensorShape, to represent high dimension state.

- A `output_size` attribute. This can be a single integer or a

TensorShape, which represent the shape of the output. For backward

compatible reason, if this attribute is not availa

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值