All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.deeplearning4j.nn.api.MaskState Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.deeplearning4j.nn.api;

/**
 * MaskState: specifies whether a mask should be applied or not.
 *
 * Masks should not be applied in all cases, depending on the network configuration - for example input Dense -> RNN
 * -> Dense -> RnnOutputLayer
* The first dense layer should be masked (using the input mask) whereas the second shouldn't be, as it has valid data * coming from the RNN layer below. For variable length situations like that, the masking can be implemented using the * label mask, which will backpropagate 0s for those time steps.
* In other cases, the *should* be applied - for example, input -> BidirectionalRnn -> Dense -> Output. In such a case, * the dense layer should be masked using the input mask.
*

* Essentially: Active = apply mask to activations and errors.
* Passthrough = feed forward the input mask (if/when necessary) but don't actually apply it.
* * @author Alex Black */ public enum MaskState { Active, Passthrough }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy