SpatialDropout3D
类keras.layers.SpatialDropout3D(
rate, data_format=None, seed=None, name=None, dtype=None
)
Dropout 的三维空间版本。
此版本的功能与 Dropout 相同,但它丢弃的是整个三维特征图,而非单个元素。如果特征图中的相邻体素高度相关(这通常发生在早期卷积层中),则常规 Dropout 将无法对激活进行正则化,只会导致有效学习率下降。在这种情况下,SpatialDropout3D 有助于促进特征图之间的独立性,应使用此层代替常规 Dropout。
参数
"channels_first"
或 "channels_last"
。在 "channels_first"
模式下,通道维度(深度)位于索引 1,在 "channels_last"
模式下位于索引 4。默认使用 ~/.keras/keras.json
Keras 配置文件中的 image_data_format
值。如果从未设置,则默认为 "channels_last"
。调用参数
输入形状
如果 data_format='channels_first',则为形状为 (samples, channels, dim1, dim2, dim3)
的 5D 张量;如果 data_format='channels_last',则为形状为 (samples, dim1, dim2, dim3, channels)
的 5D 张量。
输出形状 与输入相同。
参考