TensorFlow 2.0 Beta is available Learn more

tfp.layers.BlockwiseInitializer

Class BlockwiseInitializer

Initializer which concats other intializers.

Aliases:

  • Class tfp.layers.BlockwiseInitializer
  • Class tfp.layers.initializers.BlockwiseInitializer

Defined in python/layers/initializers.py.

__init__

__init__(
    initializers,
    sizes,
    validate_args=False
)

Creates the BlockwiseInitializer.

Arguments:

  • initializers: list of Keras initializers, e.g., "glorot_uniform" or tf.keras.initializers.Constant(0.5413).
  • sizes: list of int scalars representing the number of elements associated with each initializer in initializers.
  • validate_args: Python bool indicating we should do (possibly expensive) graph-time assertions, if necessary.

Properties

initializers

sizes

validate_args

Methods

__call__

__call__(
    shape,
    dtype=None
)

Returns a tensor object initialized as specified by the initializer.

Args:

  • shape: Shape of the tensor.
  • dtype: Optional dtype of the tensor. If not provided will return tensor of tf.float32.

from_config

@classmethod
from_config(
    cls,
    config
)

Instantiates an initializer from a configuration dictionary.

get_config

get_config()

Returns initializer configuration as a JSON-serializable dict.