空间Dropout层

SpatialDropout1DSpatialDropout2DSpatialDropout3D这三种层功能都与Dropout相同,但SpatialDropout1D会丢弃整个1D的特征,SpatialDropout2D会丢弃整个2D的特征,SpatialDropout3D会丢弃整个3D的特征,均不是单个像素。如果特征图中相邻的帧为强相关,常规的Dropout无法激活正则化导致学习速率降低,就可以使用SpatialDropout系列层来代替。

SpatialDropout1D的输入输出形状为3D张量,形状为(samples, timestamps, channels)SpatialDropout2D的输入输出形状为4D张量,形状为(samples, channels, rows, cols)SpatialDropout3D的输入输出形状为5D张量,形状为(samples, channels, dim1, dim2, dim3)