# Path: deep_verify/src/auto_verifier.py
# class NotVerifiableError(Exception):
# class VerifiableLayerBuilder(object):
#   def __init__(self, network):
#   def build_layers(self):
#   def _build_layers_rec(self, node, known_fanout=1, batchnorm_node=None):
#   def _fuse(self, verifiable_layers):
# 
# Path: deep_verify/src/bounds/naive_bounds.py
# def input_bounds(inputs, delta, lower_bound=0., upper_bound=1.,
#                  preprocess_fn=None):
# class NaiveBoundPropagation(layer_bounds.BoundPropagation):


import abc
import collections
import interval_bound_propagation as ibp
import sonnet as snt
import tensorflow as tf
from absl.testing import parameterized
from deep_verify.src import auto_verifier
from deep_verify.src.bounds import naive_bounds
  def _num_classes(self):
    return 3

  def _batch_size(self):
    return 3

  def _image_data(self):
    image = tf.random_uniform(shape=(self._batch_size(), 5, 3, 2),
                              dtype=tf.float32)
    label = tf.random_uniform((self._batch_size(),),
                              maxval=self._num_classes(),
                              dtype=tf.int64)
    return ImageLabel(image=image, label=label)

  def _network(self, model):
    return _TestNet(self._num_classes(), self._script_fn(model))

  def _script_fn(self, model):
    return globals()['_' + model + '_script']

  def _verifiable_layer_builder(self, net):
    return auto_verifier.VerifiableLayerBuilder(net)

  def _apply_verification(self, model, objective_computation_config=None):
    image_data = self._image_data()
    net = self._network(model)
    net(image_data.image)

    # Bound propagation is performed on the graph representation.
    input_bounds = naive_bounds.input_bounds(image_data.image, delta=.1)

# Path: deep_verify/src/auto_verifier.py
# class NotVerifiableError(Exception):
# class VerifiableLayerBuilder(object):
#   def __init__(self, network):
#   def build_layers(self):
#   def _build_layers_rec(self, node, known_fanout=1, batchnorm_node=None):
#   def _fuse(self, verifiable_layers):
# 
# Path: deep_verify/src/bounds/naive_bounds.py
# def input_bounds(inputs, delta, lower_bound=0., upper_bound=1.,
#                  preprocess_fn=None):
# class NaiveBoundPropagation(layer_bounds.BoundPropagation):


# Path: deep_verify/tests/formulations/verify_dual_base_test.py
import abc
import collections
import interval_bound_propagation as ibp
import sonnet as snt
import tensorflow as tf
from absl.testing import parameterized
from deep_verify.src import auto_verifier
from deep_verify.src.bounds import naive_bounds

  def _num_classes(self):
    return 3

  def _batch_size(self):
    return 3

  def _image_data(self):
    image = tf.random_uniform(shape=(self._batch_size(), 5, 3, 2),
                              dtype=tf.float32)
    label = tf.random_uniform((self._batch_size(),),
                              maxval=self._num_classes(),
                              dtype=tf.int64)
    return ImageLabel(image=image, label=label)

  def _network(self, model):
    return _TestNet(self._num_classes(), self._script_fn(model))

  def _script_fn(self, model):
    return globals()['_' + model + '_script']

  def _verifiable_layer_builder(self, net):
    return auto_verifier.VerifiableLayerBuilder(net)

  def _apply_verification(self, model, objective_computation_config=None):
    image_data = self._image_data()
    net = self._network(model)
    net(image_data.image)

    # Bound propagation is performed on the graph representation.
    input_bounds = naive_bounds.input_bounds(image_data.image, delta=.1)

    boundprop_method = naive_bounds.NaiveBoundPropagation()