Mar*_*dek 5 python machine-learning neural-network deep-learning keras
来自keras docs:然后您可以使用TimeDistributed
将Dense
图层分别应用于10个时间步长中的每一个:
# as the first layer in a model
model = Sequential()
model.add(TimeDistributed(Dense(8), input_shape=(10, 16)))
# now model.output_shape == (None, 10, 8)
# subsequent layers: no need for input_shape
model.add(TimeDistributed(Dense(32)))
# now model.output_shape == (None, 10, 32)
Run Code Online (Sandbox Code Playgroud)
我无法在任何地方找到它,Dense
层的权重是否在时间轴上共享?
是的,它们是共享的 - Dense
每个都是相同的timestep
.此外 - 在Keras 2.0
行为TimeDistributed
中,现在默认为Dense
应用于输入的图层具有多于2D(包括batch_dimension
).
归档时间: |
|
查看次数: |
1526 次 |
最近记录: |