Regularization Layers

Dropout Layer

class, out_dim=None, extra_deps=(), **kwargs)[source]

Just the same as CopyLayer, because that one already supports dropout.

  • in_dim (Dim|None) – just for checking. but also, if this is provided, it will set the feature_dim to this.

  • out_dim (Dim|None) – alternative to in_dim. see in_dim doc.

  • extra_deps (list[LayerBase]) – Just add as an additional dependency, without really using it. This can have an effect though on the search beam, via SelectSearchSourcesLayer. We only have this here for the CopyLayer because the get_out_data_from_opts() must know about it and define the right beam. Also see the option collocate_with, which is different in that it does not add a dependency. Note that this will not be real TF control dependencies, but it simply sets the dependency on the layer. If you want to have a real TF control dependency, use IdentityLayer.

layer_class: Optional[str] = 'dropout'[source]
input_data: Optional[Data][source]
kwargs: Optional[Dict[str]][source]
output_before_activation: Optional[OutputWithActivation][source]
output_loss: Optional[tf.Tensor][source]
rec_vars_outputs: Dict[str, tf.Tensor][source]
search_choices: Optional[SearchChoices][source]
params: Dict[str, tf.Variable][source]
saveable_param_replace: Dict[tf.Variable, Union['', None]][source]
stats: Dict[str, tf.Tensor][source]