Type SpatialDropout2D
Namespace tensorflow.keras.layers
Parent Dropout
Interfaces ISpatialDropout2D
Spatial 2D version of Dropout. This version performs the same function as Dropout, however it drops
entire 2D feature maps instead of individual elements. If adjacent pixels
within feature maps are strongly correlated (as is normally the case in
early convolution layers) then regular dropout will not regularize the
activations and will otherwise just result in an effective learning rate
decrease. In this case, SpatialDropout2D will help promote independence
between feature maps and should be used instead.
Methods
Properties
- activity_regularizer
- activity_regularizer_dyn
- built
- data_format
- dtype
- dtype_dyn
- dynamic
- dynamic_dyn
- inbound_nodes
- inbound_nodes_dyn
- input
- input_dyn
- input_mask
- input_mask_dyn
- input_shape
- input_shape_dyn
- input_spec
- input_spec_dyn
- losses
- losses_dyn
- metrics
- metrics_dyn
- name
- name_dyn
- name_scope
- name_scope_dyn
- noise_shape
- non_trainable_variables
- non_trainable_variables_dyn
- non_trainable_weights
- non_trainable_weights_dyn
- outbound_nodes
- outbound_nodes_dyn
- output
- output_dyn
- output_mask
- output_mask_dyn
- output_shape
- output_shape_dyn
- PythonObject
- rate
- seed
- stateful
- submodules
- submodules_dyn
- supports_masking
- trainable
- trainable_dyn
- trainable_variables
- trainable_variables_dyn
- trainable_weights
- trainable_weights_dyn
- updates
- updates_dyn
- variables
- variables_dyn
- weights
- weights_dyn
Public static methods
SpatialDropout2D NewDyn(object rate, object data_format, IDictionary<string, object> kwargs)
Create an instance of `HParams` from keyword arguments. The keyword arguments specify name-values pairs for the hyperparameters.
The parameter types are inferred from the type of the values passed. The parameter names are added as attributes of `HParams` object, so they
can be accessed directly with the dot notation `hparams._name_`. Example:
Note that a few names are reserved and cannot be used as hyperparameter
names. If you use one of the reserved name the constructor raises a
`ValueError`.
Parameters
-
object
rate -
object
data_format -
IDictionary<string, object>
kwargs - Key-value pairs where the key is the hyperparameter name and the value is the value for the parameter.
Show Example
# Define 3 hyperparameters: 'learning_rate' is a float parameter, # 'num_hidden_units' an integer parameter, and 'activation' a string # parameter. hparams = tf.contrib.training.HParams( learning_rate=0.1, num_hidden_units=100, activation='relu') hparams.activation ==> 'relu'