LostTech.TensorFlow : API Documentation

Type BatchNormalization

Namespace tensorflow.layers

Parent BatchNormalization

Interfaces IBatchNormalization

Batch Normalization layer from http://arxiv.org/abs/1502.03167.

"Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift"

Sergey Ioffe, Christian Szegedy

Keras APIs handle BatchNormalization updates to the moving_mean and moving_variance as part of their `fit()` and `evaluate()` loops. However, if a custom training loop is used with an instance of `Model`, these updates need to be explicitly included. Here's a simple example of how it can be done:
Show Example
# model is an instance of Model that contains BatchNormalization layer.
            update_ops = model.get_updates_for(None) + model.get_updates_for(features)
            train_op = optimizer.minimize(loss)
            train_op = tf.group([train_op, update_ops]) 

Methods

Properties

Public static methods

BatchNormalization NewDyn(ImplicitContainer<T> axis, ImplicitContainer<T> momentum, ImplicitContainer<T> epsilon, ImplicitContainer<T> center, ImplicitContainer<T> scale, ImplicitContainer<T> beta_initializer, ImplicitContainer<T> gamma_initializer, ImplicitContainer<T> moving_mean_initializer, ImplicitContainer<T> moving_variance_initializer, object beta_regularizer, object gamma_regularizer, object beta_constraint, object gamma_constraint, ImplicitContainer<T> renorm, object renorm_clipping, ImplicitContainer<T> renorm_momentum, object fused, ImplicitContainer<T> trainable, object virtual_batch_size, object adjustment, object name, IDictionary<string, object> kwargs)

Public properties

PythonFunctionContainer activity_regularizer get; set;

object activity_regularizer_dyn get; set;

object adjustment get; set;

object axis get; set;

object beta get; set;

object beta_constraint get; set;

object beta_initializer get; set;

object beta_regularizer get; set;

bool built get; set;

bool center get; set;

object dtype get;

object dtype_dyn get;

bool dynamic get;

object dynamic_dyn get;

double epsilon get; set;

Nullable<bool> fused get; set;

object gamma get; set;

object gamma_constraint get; set;

object gamma_initializer get; set;

object gamma_regularizer get; set;

object graph get;

DEPRECATED FUNCTION

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Stop using this property because tf.layers layers no longer track their graph.

object graph_dyn get;

DEPRECATED FUNCTION

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Stop using this property because tf.layers layers no longer track their graph.

IList<Node> inbound_nodes get;

object inbound_nodes_dyn get;

IList<object> input get;

object input_dyn get;

object input_mask get;

object input_mask_dyn get;

IList<object> input_shape get;

object input_shape_dyn get;

InputSpec input_spec get; set;

object input_spec_dyn get; set;

IList<object> losses get;

object losses_dyn get;

IList<object> metrics get;

object metrics_dyn get;

double momentum get; set;

object moving_mean get; set;

object moving_mean_initializer get; set;

object moving_stddev get; set;

object moving_variance get; set;

object moving_variance_initializer get; set;

object name get;

object name_dyn get;

object name_scope get;

object name_scope_dyn get;

IList<object> non_trainable_variables get;

object non_trainable_variables_dyn get;

IList<object> non_trainable_weights get;

object non_trainable_weights_dyn get;

IList<object> outbound_nodes get;

object outbound_nodes_dyn get;

IList<object> output get;

object output_dyn get;

object output_mask get;

object output_mask_dyn get;

object output_shape get;

object output_shape_dyn get;

object PythonObject get;

bool renorm get; set;

IDictionary<object, object> renorm_clipping get; set;

object renorm_mean get; set;

double renorm_momentum get; set;

object renorm_stddev get; set;

bool scale get; set;

string scope_name get;

object scope_name_dyn get;

bool stateful get; set;

ValueTuple<object> submodules get;

object submodules_dyn get;

bool supports_masking get; set;

bool trainable get; set;

object trainable_dyn get; set;

object trainable_variables get;

object trainable_variables_dyn get;

IList<object> trainable_weights get;

object trainable_weights_dyn get;

IList<object> updates get;

object updates_dyn get;

object variables get;

object variables_dyn get;

Nullable<int> virtual_batch_size get; set;

IList<object> weights get;

object weights_dyn get;