# Path: tf_slim/nets/alexnet.py
# def alexnet_v2_arg_scope(weight_decay=0.0005):
# def alexnet_v2(inputs,
#                num_classes=1000,
#                is_training=True,
#                dropout_keep_prob=0.5,
#                spatial_squeeze=True,
#                scope='alexnet_v2'):
# 
# Path: tf_slim/ops/variables.py
# def assert_global_step(global_step_tensor):
# def assert_or_get_global_step(graph=None, global_step_tensor=None):
# def get_global_step(graph=None):
# def create_global_step(graph=None):
# def get_or_create_global_step(graph=None):
# def local_variable(initial_value,
#                    validate_shape=True,
#                    name=None,
#                    use_resource=None):
# def global_variable(initial_value,
#                     validate_shape=True,
#                     name=None,
#                     use_resource=None):
# def variable(name,
#              shape=None,
#              dtype=None,
#              initializer=None,
#              regularizer=None,
#              trainable=True,
#              collections=None,
#              caching_device=None,
#              device=None,
#              partitioner=None,
#              custom_getter=None,
#              use_resource=None,
#              synchronization=variables.VariableSynchronization.AUTO,
#              aggregation=variables.VariableAggregation.NONE):
# def model_variable(name,
#                    shape=None,
#                    dtype=dtypes.float32,
#                    initializer=None,
#                    regularizer=None,
#                    trainable=True,
#                    collections=None,
#                    caching_device=None,
#                    device=None,
#                    partitioner=None,
#                    custom_getter=None,
#                    use_resource=None,
#                    synchronization=variables.VariableSynchronization.AUTO,
#                    aggregation=variables.VariableAggregation.NONE):
# def add_model_variable(var):
# def get_variables(scope=None,
#                   suffix=None,
#                   collection=ops.GraphKeys.GLOBAL_VARIABLES):
# def get_model_variables(scope=None, suffix=None):
# def get_local_variables(scope=None, suffix=None):
# def get_trainable_variables(scope=None, suffix=None):
# def get_variables_to_restore(include=None, exclude=None):
# def get_variables_by_suffix(suffix, scope=None):
# def get_variables_by_name(given_name, scope=None):
# def get_unique_variable(var_op_name):
# def assign_from_values(var_names_to_values):
# def assign_from_values_fn(var_names_to_values):
#   def callback(session):
# def get_variable_full_name(var):
# def assign_from_checkpoint(model_path, var_list, ignore_missing_vars=False):
# def assign_from_checkpoint_fn(model_path,
#                               var_list,
#                               ignore_missing_vars=False,
#                               reshape_variables=False):
#     def callback(session):
#   def __init__(self,
#                num_tasks=0,
#                job_name='ps',
#                device_type='CPU',
#                device_index=0,
#                replica=None):
#   def __call__(self, op):
# def filter_variables(var_list,
#                      include_patterns=None,
#                      exclude_patterns=None,
#                      reg_search=True):
# class VariableDeviceChooser(object):


import tensorflow.compat.v1 as tf
from tf_slim.nets import alexnet
from tf_slim.ops import variables as variables_lib
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import random_ops
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import variables
from tensorflow.python.platform import test
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for slim.nets.alexnet."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# pylint:disable=g-direct-tensorflow-import
# pylint:enable=g-direct-tensorflow-import


def setUpModule():
  tf.disable_eager_execution()


class AlexnetV2Test(test.TestCase):

  def testBuild(self):
    batch_size = 5
    height, width = 224, 224
    num_classes = 1000
    with self.cached_session():
      inputs = random_ops.random_uniform((batch_size, height, width, 3))

# Path: tf_slim/nets/alexnet.py
# def alexnet_v2_arg_scope(weight_decay=0.0005):
# def alexnet_v2(inputs,
#                num_classes=1000,
#                is_training=True,
#                dropout_keep_prob=0.5,
#                spatial_squeeze=True,
#                scope='alexnet_v2'):
# 
# Path: tf_slim/ops/variables.py
# def assert_global_step(global_step_tensor):
# def assert_or_get_global_step(graph=None, global_step_tensor=None):
# def get_global_step(graph=None):
# def create_global_step(graph=None):
# def get_or_create_global_step(graph=None):
# def local_variable(initial_value,
#                    validate_shape=True,
#                    name=None,
#                    use_resource=None):
# def global_variable(initial_value,
#                     validate_shape=True,
#                     name=None,
#                     use_resource=None):
# def variable(name,
#              shape=None,
#              dtype=None,
#              initializer=None,
#              regularizer=None,
#              trainable=True,
#              collections=None,
#              caching_device=None,
#              device=None,
#              partitioner=None,
#              custom_getter=None,
#              use_resource=None,
#              synchronization=variables.VariableSynchronization.AUTO,
#              aggregation=variables.VariableAggregation.NONE):
# def model_variable(name,
#                    shape=None,
#                    dtype=dtypes.float32,
#                    initializer=None,
#                    regularizer=None,
#                    trainable=True,
#                    collections=None,
#                    caching_device=None,
#                    device=None,
#                    partitioner=None,
#                    custom_getter=None,
#                    use_resource=None,
#                    synchronization=variables.VariableSynchronization.AUTO,
#                    aggregation=variables.VariableAggregation.NONE):
# def add_model_variable(var):
# def get_variables(scope=None,
#                   suffix=None,
#                   collection=ops.GraphKeys.GLOBAL_VARIABLES):
# def get_model_variables(scope=None, suffix=None):
# def get_local_variables(scope=None, suffix=None):
# def get_trainable_variables(scope=None, suffix=None):
# def get_variables_to_restore(include=None, exclude=None):
# def get_variables_by_suffix(suffix, scope=None):
# def get_variables_by_name(given_name, scope=None):
# def get_unique_variable(var_op_name):
# def assign_from_values(var_names_to_values):
# def assign_from_values_fn(var_names_to_values):
#   def callback(session):
# def get_variable_full_name(var):
# def assign_from_checkpoint(model_path, var_list, ignore_missing_vars=False):
# def assign_from_checkpoint_fn(model_path,
#                               var_list,
#                               ignore_missing_vars=False,
#                               reshape_variables=False):
#     def callback(session):
#   def __init__(self,
#                num_tasks=0,
#                job_name='ps',
#                device_type='CPU',
#                device_index=0,
#                replica=None):
#   def __call__(self, op):
# def filter_variables(var_list,
#                      include_patterns=None,
#                      exclude_patterns=None,
#                      reg_search=True):
# class VariableDeviceChooser(object):


# Path: tf_slim/nets/alexnet_test.py
import tensorflow.compat.v1 as tf
from tf_slim.nets import alexnet
from tf_slim.ops import variables as variables_lib
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import random_ops
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import variables
from tensorflow.python.platform import test

#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for slim.nets.alexnet."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# pylint:disable=g-direct-tensorflow-import
# pylint:enable=g-direct-tensorflow-import


def setUpModule():
  tf.disable_eager_execution()


class AlexnetV2Test(test.TestCase):

  def testBuild(self):
    batch_size = 5
    height, width = 224, 224
    num_classes = 1000
    with self.cached_session():
      inputs = random_ops.random_uniform((batch_size, height, width, 3))

      logits, _ = alexnet.alexnet_v2(inputs, num_classes)