Keras TimeDistributed - 权重是否共享?

时间:2017-04-06 20:23:00

标签: python machine-learning neural-network deep-learning keras

来自keras docs:然后您可以使用TimeDistributedDense图层分别应用于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)

我无法在任何地方找到它,Dense图层的权重是否在时间轴上共享?

1 个答案:

答案 0 :(得分:6)

是的,它们是共享的 - 每个@Html.DropDownListFor(model => model.CustomerId, Model.CustomerList, "---Select one---", new { @class = "company" }); 都应用了完全相同的Dense。此外 - 在timestep中,Keras 2.0之类的行为现在是应用于输入的TimeDistributed图层的默认值,其中包含的内容超过2D(包括Dense)。

相关问题