# Path: interval_bound_propagation/src/layers.py
# class BatchNorm(snt.BatchNorm):
# class ImageNorm(snt.AbstractModule):
#   def __init__(self, axis=None, offset=True, scale=False,
#                decay_rate=0.999, eps=1e-3, initializers=None,
#                partitioners=None, regularizers=None,
#                update_ops_collection=None, name='batch_norm'):
#   def _build_statistics(self, input_batch, axis, use_batch_stats, stat_dtype):
#   def _build(self, input_batch, is_training=True, test_local_stats=False,
#              reuse=False):
#   def scale(self):
#   def bias(self):
#   def mean(self):
#   def variance(self):
#   def epsilon(self):
#   def __init__(self, mean, std, name='image_norm'):
#   def _build(self, inputs):
#   def scale(self):
#   def offset(self):
#   def apply(self, inputs):
# 
# Path: interval_bound_propagation/src/verifiable_wrapper.py
# class VerifiableWrapper(object):
# class ModelInputWrapper(object):
# class ConstWrapper(VerifiableWrapper):
# class LinearFCWrapper(VerifiableWrapper):
# class LinearConvWrapper(VerifiableWrapper):
# class LinearConv1dWrapper(LinearConvWrapper):
# class LinearConv2dWrapper(LinearConvWrapper):
# class IncreasingMonotonicWrapper(VerifiableWrapper):
# class SoftmaxWrapper(VerifiableWrapper):
# class PiecewiseMonotonicWrapper(VerifiableWrapper):
# class ImageNormWrapper(IncreasingMonotonicWrapper):
# class BatchNormWrapper(VerifiableWrapper):
# class BatchReshapeWrapper(VerifiableWrapper):
# class BatchFlattenWrapper(BatchReshapeWrapper):
#   def __init__(self, module):
#   def input_bounds(self):
#   def output_bounds(self):
#   def module(self):
#   def __str__(self):
#   def propagate_bounds(self, *input_bounds):
#   def _propagate_through(self, module, *input_bounds):
#   def __init__(self, index):
#   def index(self):
#   def output_bounds(self):
#   def output_bounds(self, bounds):
#   def __str__(self):
#   def _propagate_through(self, module):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, **parameters):
#   def parameters(self):
#   def _propagate_through(self, module, main_bounds, *other_input_bounds):
#   def __init__(self):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, boundaries=()):
#   def boundaries(self):
#   def _propagate_through(self, module, main_bounds, *other_input_bounds):
#   def __init__(self, module):
#   def inner_module(self):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, shape):
#   def shape(self):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):


import collections
import numpy as np
import sonnet as snt
import tensorflow.compat.v1 as tf
from absl import logging
from interval_bound_propagation.src import layers
from interval_bound_propagation.src import verifiable_wrapper
    """
    return self._fanouts[node]

  def _build(self, *z0, **kwargs):
    """Outputs logits from input z0.

    Args:
      *z0: inputs as `Tensor`.
      **kwargs: Other arguments passed directly to the _build() function of the
        wrapper model. Assumes the possible presence of `override` (defaults to
        False). However, if False, this function does not update any internal
        state and reuses any components computed by a previous call to _build().
        If there were no previous calls to _build(), behaves as if it was set to
        True.

    Returns:
      logits resulting from using z0 as inputs.
    """
    override = not self.is_connected
    if 'override' in kwargs:
      override = kwargs['override'] or override
      del kwargs['override']
    if override:
      self._inputs = z0[0] if len(z0) == 1 else z0
      # Build underlying verifiable modules.
      self._model_inputs = []
      self._modules = []
      self._produced_by = {}  # Connection graph.
      self._fanouts = collections.Counter()
      for i, z in enumerate(z0):

# Path: interval_bound_propagation/src/layers.py
# class BatchNorm(snt.BatchNorm):
# class ImageNorm(snt.AbstractModule):
#   def __init__(self, axis=None, offset=True, scale=False,
#                decay_rate=0.999, eps=1e-3, initializers=None,
#                partitioners=None, regularizers=None,
#                update_ops_collection=None, name='batch_norm'):
#   def _build_statistics(self, input_batch, axis, use_batch_stats, stat_dtype):
#   def _build(self, input_batch, is_training=True, test_local_stats=False,
#              reuse=False):
#   def scale(self):
#   def bias(self):
#   def mean(self):
#   def variance(self):
#   def epsilon(self):
#   def __init__(self, mean, std, name='image_norm'):
#   def _build(self, inputs):
#   def scale(self):
#   def offset(self):
#   def apply(self, inputs):
# 
# Path: interval_bound_propagation/src/verifiable_wrapper.py
# class VerifiableWrapper(object):
# class ModelInputWrapper(object):
# class ConstWrapper(VerifiableWrapper):
# class LinearFCWrapper(VerifiableWrapper):
# class LinearConvWrapper(VerifiableWrapper):
# class LinearConv1dWrapper(LinearConvWrapper):
# class LinearConv2dWrapper(LinearConvWrapper):
# class IncreasingMonotonicWrapper(VerifiableWrapper):
# class SoftmaxWrapper(VerifiableWrapper):
# class PiecewiseMonotonicWrapper(VerifiableWrapper):
# class ImageNormWrapper(IncreasingMonotonicWrapper):
# class BatchNormWrapper(VerifiableWrapper):
# class BatchReshapeWrapper(VerifiableWrapper):
# class BatchFlattenWrapper(BatchReshapeWrapper):
#   def __init__(self, module):
#   def input_bounds(self):
#   def output_bounds(self):
#   def module(self):
#   def __str__(self):
#   def propagate_bounds(self, *input_bounds):
#   def _propagate_through(self, module, *input_bounds):
#   def __init__(self, index):
#   def index(self):
#   def output_bounds(self):
#   def output_bounds(self, bounds):
#   def __str__(self):
#   def _propagate_through(self, module):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, **parameters):
#   def parameters(self):
#   def _propagate_through(self, module, main_bounds, *other_input_bounds):
#   def __init__(self):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, boundaries=()):
#   def boundaries(self):
#   def _propagate_through(self, module, main_bounds, *other_input_bounds):
#   def __init__(self, module):
#   def inner_module(self):
#   def __init__(self, module):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module, shape):
#   def shape(self):
#   def _propagate_through(self, module, input_bounds):
#   def __init__(self, module):


# Path: interval_bound_propagation/src/model.py
import collections
import numpy as np
import sonnet as snt
import tensorflow.compat.v1 as tf
from absl import logging
from interval_bound_propagation.src import layers
from interval_bound_propagation.src import verifiable_wrapper

    """
    return self._fanouts[node]

  def _build(self, *z0, **kwargs):
    """Outputs logits from input z0.

    Args:
      *z0: inputs as `Tensor`.
      **kwargs: Other arguments passed directly to the _build() function of the
        wrapper model. Assumes the possible presence of `override` (defaults to
        False). However, if False, this function does not update any internal
        state and reuses any components computed by a previous call to _build().
        If there were no previous calls to _build(), behaves as if it was set to
        True.

    Returns:
      logits resulting from using z0 as inputs.
    """
    override = not self.is_connected
    if 'override' in kwargs:
      override = kwargs['override'] or override
      del kwargs['override']
    if override:
      self._inputs = z0[0] if len(z0) == 1 else z0
      # Build underlying verifiable modules.
      self._model_inputs = []
      self._modules = []
      self._produced_by = {}  # Connection graph.
      self._fanouts = collections.Counter()
      for i, z in enumerate(z0):

        self._model_inputs.append(verifiable_wrapper.ModelInputWrapper(i))