DropPath
classkeras_cv.layers.DropPath(rate=0.5, seed=None, **kwargs)
Implements the DropPath layer. DropPath randomly drops samples during
training with a probability of rate
. Note that this layer drops individual
samples within a batch and not the entire batch. DropPath randomly drops
some individual samples from a batch, whereas StochasticDepth
randomly drops the entire batch.
References
Arguments
Example
DropPath
can be used in any network as follows:
# (...)
input = tf.ones((1, 3, 3, 1), dtype=tf.float32)
residual = keras.layers.Conv2D(1, 1)(input)
output = keras_cv.layers.DropPath()(input)
# (...)