Module: tfm.utils

Common TF utilities.

Modules

activations module: Activations package definition.

Functions

assert_rank(...): Raises an exception if the tensor rank is not of the expected rank.

clone_initializer(...)

cross_replica_concat(...): Concatenates the given value across (GPU/TPU) cores, along axis.

deserialize_keras_object(...)

get_activation(...): Maps an identifier to a Python function, e.g., "relu" => tf.nn.relu.

get_replica_id(...): Gets replica id depending on the environment.

get_shape_list(...): Returns a list of the shape of tensor, preferring static dimensions.

is_special_none_tensor(...): Checks if a tensor is a special None Tensor.

pack_inputs(...): Pack a list of inputs tensors to a tuple. (deprecated)

safe_mean(...): Computes a safe mean of the losses.

serialize_activation(...)

serialize_constraint(...)

serialize_initializer(...)

serialize_keras_object(...)

serialize_layer(...)

serialize_regularizer(...)

unpack_inputs(...): unpack a tuple of inputs tensors to a tuple. (deprecated)