def dropout_channels(incoming, *args, **kwargs):
 ndim = len(getattr(incoming, 'output_shape', incoming))
 kwargs['shared_axes'] = tuple(range(2, ndim))
 return DropoutLayer(incoming, *args, **kwargs)

def dropout_channels ( incoming , * args , ** kwargs ) : ndim = len ( getattr ( incoming , 'output_shape' , incoming ) ) kwargs [ 'shared_axes' ] = tuple ( range ( 2 , ndim ) ) return DropoutLayer ( incoming , * args , ** kwargs )
convenience function to drop full channels of feature maps .