# Path: tf_slim/layers/regularizers.py
# def l1_regularizer(scale, scope=None):
#   def l1(weights, name=None):
# def l2_regularizer(scale, scope=None):
#   def l2(weights):
# def l1_l2_regularizer(scale_l1=1.0, scale_l2=1.0, scope=None):
# def sum_regularizer(regularizer_list, scope=None):
#   def sum_reg(weights):
# def apply_regularization(regularizer, weights_list=None):


import numpy as np
import tensorflow.compat.v1 as tf
from tf_slim.layers import regularizers
from tensorflow.python.client import session
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import math_ops
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 RegularizerTest(test.TestCase):

  def test_l1(self):
    with self.assertRaises(ValueError):

# Path: tf_slim/layers/regularizers.py
# def l1_regularizer(scale, scope=None):
#   def l1(weights, name=None):
# def l2_regularizer(scale, scope=None):
#   def l2(weights):
# def l1_l2_regularizer(scale_l1=1.0, scale_l2=1.0, scope=None):
# def sum_regularizer(regularizer_list, scope=None):
#   def sum_reg(weights):
# def apply_regularization(regularizer, weights_list=None):


# Path: tf_slim/layers/regularizers_test.py
import numpy as np
import tensorflow.compat.v1 as tf
from tf_slim.layers import regularizers
from tensorflow.python.client import session
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import math_ops
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 RegularizerTest(test.TestCase):

  def test_l1(self):
    with self.assertRaises(ValueError):

      regularizers.l1_regularizer(-1.)