# Path: lamb/tiled_linear.py
# class AbstractTiledLinear(snt_base.AbstractModule):
# class TiledLinear(AbstractTiledLinear):
# class LayerNormedTiledLinear(AbstractTiledLinear):
# class SparseTiledLinear(AbstractTiledLinear):
# class OverlaidTiledLinear(TiledLinear):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='tiled_linear'):
#   def _canonicalize_input_name_and_sizes(self, name_and_sizes):
#   def _check_output_name_and_sizes(self, name_and_sizes):
#   def _check_var_init_params(self, var_init_params):
#   def _check_dtype(self, inputs, previous_dtype):
#   def valid_var_init_param_keys(self):
#   def _find_var_init_param(self, var_name, key, default):
#   def _get_variable(self, name, shape,
#                     initializer=None,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None):
#   def _declared_input_sizes(self):
#   def _inferred_input_sizes(self, inputs):
#   def _merge_input_sizes(self, inputs):
#   def _merged_input_name_and_sizes(self):
#   def _output_name_and_sizes(self):
#   def _build(self, inputs):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='tiled_linear'):
#   def _ensure_weights(self):
#       def tiled_initializer(shape, dtype=self._dtype, partition_info=None):
#   def _ensure_biases(self):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#     def split_output(output):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#     def make_weights_for_inputs():
#     def make_biases():
#     def split_output(output):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='sparse_tiled_linear'):
#   def _find_or_create_sparse_indices(self, name, shape):
#   def _find_or_create_sparse_variable(self, name, sparse_indices, shape,
#                                       initializer=None, partitioner=None,
#                                       regularizer=None):
#   def valid_var_init_param_keys(self):
#   def _get_variable(self, name, shape,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None, sparse_indices=None):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#   def __init__(self, *args, **kwargs):
#   def _get_variable(self, name, shape,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None):
#   def _low_rank_matrix(self, name, rank=None, shape=None,
#                        initializer=None, trainable=True):
#   def valid_var_init_param_keys(self):


import collections
import six
import tensorflow.compat.v1 as tf
from lamb import tiled_linear
      initializer: (optional) The initializer to use for the weight and
        projection matrices.
      tie_gates: Whether to make the input gate one minus the forget gate.
      activation: Activation function of the inner states.
      input_transform: None, or a function of one argument that
        massages the input in some way. For example, variational
        dropout can be implemted by passing a Dropout object here.
      state_transform: Similar to input_transform, this is
        applied to the recurrent state.
      update_transform: Similar to input_transform, this is
        applied to the proposed update ('h').
      tiled_linear_class: A class such as tiled_linear.TiledLinear
        that's instantiated an unspecified number of times with the
        same tiled_linear_var_init_params but with possibly different
        inputs and outputs. Defaults to tiled_linear.TiledLinear.
      tiled_linear_var_init_params: Passed right on to
        `tiled_linear_class` as the `var_init_params` argument.
    """
    assert not use_peepholes, 'Peepholes are not implemented in RHNCell.'
    self._num_units = num_units
    self._depth = depth
    self._use_peepholes = use_peepholes
    self._cell_clip = cell_clip
    self._initializer = initializer
    self._tie_gates = tie_gates
    self._activation = activation
    self._input_transform = input_transform
    self._state_transform = state_transform
    self._update_transform = update_transform
    if tiled_linear_class is None:

# Path: lamb/tiled_linear.py
# class AbstractTiledLinear(snt_base.AbstractModule):
# class TiledLinear(AbstractTiledLinear):
# class LayerNormedTiledLinear(AbstractTiledLinear):
# class SparseTiledLinear(AbstractTiledLinear):
# class OverlaidTiledLinear(TiledLinear):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='tiled_linear'):
#   def _canonicalize_input_name_and_sizes(self, name_and_sizes):
#   def _check_output_name_and_sizes(self, name_and_sizes):
#   def _check_var_init_params(self, var_init_params):
#   def _check_dtype(self, inputs, previous_dtype):
#   def valid_var_init_param_keys(self):
#   def _find_var_init_param(self, var_name, key, default):
#   def _get_variable(self, name, shape,
#                     initializer=None,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None):
#   def _declared_input_sizes(self):
#   def _inferred_input_sizes(self, inputs):
#   def _merge_input_sizes(self, inputs):
#   def _merged_input_name_and_sizes(self):
#   def _output_name_and_sizes(self):
#   def _build(self, inputs):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='tiled_linear'):
#   def _ensure_weights(self):
#       def tiled_initializer(shape, dtype=self._dtype, partition_info=None):
#   def _ensure_biases(self):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#     def split_output(output):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#     def make_weights_for_inputs():
#     def make_biases():
#     def split_output(output):
#   def __init__(self, input_name_and_sizes, output_name_and_sizes,
#                var_init_params=None, name='sparse_tiled_linear'):
#   def _find_or_create_sparse_indices(self, name, shape):
#   def _find_or_create_sparse_variable(self, name, sparse_indices, shape,
#                                       initializer=None, partitioner=None,
#                                       regularizer=None):
#   def valid_var_init_param_keys(self):
#   def _get_variable(self, name, shape,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None, sparse_indices=None):
#   def _build_tiled_linear(self, inputs, input_name_and_sizes,
#                           output_name_and_sizes, add_bias):
#   def __init__(self, *args, **kwargs):
#   def _get_variable(self, name, shape,
#                     default_initializer=None, default_partitioner=None,
#                     default_regularizer=None):
#   def _low_rank_matrix(self, name, rank=None, shape=None,
#                        initializer=None, trainable=True):
#   def valid_var_init_param_keys(self):


# Path: lamb/tiled_rhn.py
import collections
import six
import tensorflow.compat.v1 as tf
from lamb import tiled_linear

      initializer: (optional) The initializer to use for the weight and
        projection matrices.
      tie_gates: Whether to make the input gate one minus the forget gate.
      activation: Activation function of the inner states.
      input_transform: None, or a function of one argument that
        massages the input in some way. For example, variational
        dropout can be implemted by passing a Dropout object here.
      state_transform: Similar to input_transform, this is
        applied to the recurrent state.
      update_transform: Similar to input_transform, this is
        applied to the proposed update ('h').
      tiled_linear_class: A class such as tiled_linear.TiledLinear
        that's instantiated an unspecified number of times with the
        same tiled_linear_var_init_params but with possibly different
        inputs and outputs. Defaults to tiled_linear.TiledLinear.
      tiled_linear_var_init_params: Passed right on to
        `tiled_linear_class` as the `var_init_params` argument.
    """
    assert not use_peepholes, 'Peepholes are not implemented in RHNCell.'
    self._num_units = num_units
    self._depth = depth
    self._use_peepholes = use_peepholes
    self._cell_clip = cell_clip
    self._initializer = initializer
    self._tie_gates = tie_gates
    self._activation = activation
    self._input_transform = input_transform
    self._state_transform = state_transform
    self._update_transform = update_transform
    if tiled_linear_class is None:

      tiled_linear_class = tiled_linear.TiledLinear