# Path: tf_slim/layers/utils.py
# def collect_named_outputs(collections, alias, outputs):
# def append_tensor_alias(tensor, alias):
# def gather_tensors_aliases(tensors):
# def get_tensor_aliases(tensor):
# def convert_collection_to_dict(collection, clear_collection=False):
# def constant_value(value_or_tensor_or_var, dtype=None):
# def static_cond(pred, fn1, fn2):
# def smart_cond(pred, fn1, fn2, name=None):
# def get_variable_collections(variables_collections, name):
# def _get_dimension(shape, dim, min_rank=1):
# def channel_dimension(shape, data_format, min_rank=1):
# def last_dimension(shape, min_rank=1):
# def two_element_tuple(int_or_tuple):
# def n_positive_integers(n, value):


import numpy as np
import tensorflow.compat.v1 as tf
from tf_slim.layers import utils
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import variables
from tensorflow.python.platform import test
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     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 regularizers."""

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


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


def setUpModule():
  tf.disable_eager_execution()


class ConstantValueTest(test.TestCase):

  def test_value(self):
    for v in [True, False, 1, 0, 1.0]:

# Path: tf_slim/layers/utils.py
# def collect_named_outputs(collections, alias, outputs):
# def append_tensor_alias(tensor, alias):
# def gather_tensors_aliases(tensors):
# def get_tensor_aliases(tensor):
# def convert_collection_to_dict(collection, clear_collection=False):
# def constant_value(value_or_tensor_or_var, dtype=None):
# def static_cond(pred, fn1, fn2):
# def smart_cond(pred, fn1, fn2, name=None):
# def get_variable_collections(variables_collections, name):
# def _get_dimension(shape, dim, min_rank=1):
# def channel_dimension(shape, data_format, min_rank=1):
# def last_dimension(shape, min_rank=1):
# def two_element_tuple(int_or_tuple):
# def n_positive_integers(n, value):


# Path: tf_slim/layers/utils_test.py
import numpy as np
import tensorflow.compat.v1 as tf
from tf_slim.layers import utils
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import variables
from tensorflow.python.platform import test

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     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 regularizers."""

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


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


def setUpModule():
  tf.disable_eager_execution()


class ConstantValueTest(test.TestCase):

  def test_value(self):
    for v in [True, False, 1, 0, 1.0]:

      value = utils.constant_value(v)