# Path: morph_net/framework/probabilistic_grouping_regularizer.py
# class ProbabilisticGroupingRegularizer(generic_regularizers.OpRegularizer):
#   def __init__(self, regularizers_to_group):
#   def regularization_vector(self):
#   def alive_vector(self):
# 
# Path: morph_net/testing/op_regularizer_stub.py
# class OpRegularizerStub(generic_regularizers.OpRegularizer):
# class OpRegularizerStubFactory(object):
#   def __init__(self, regularization_vector, alive_vector):
#   def regularization_vector(self):
#   def alive_vector(self):
#   def __init__(self, alive_stub_dict, reg_stub_dict):
#   def _create_stub(self, key):
#   def create_conv2d_regularizer(self, conv_op, manager=None):
# def image_stub():


from morph_net.framework import probabilistic_grouping_regularizer as pgr
from morph_net.testing import op_regularizer_stub
import tensorflow.compat.v1 as tf
"""Tests for framework.probabilistic_grouping_regularizer."""

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



class ProbabilisticGroupingRegularizerTest(tf.test.TestCase):

  def testProbGroupingRegularizer(self):
    reg_vec1 = [0.1, 0.3, 0.6, 0.2]
    alive_vec1 = [False, True, True, False]
    reg_vec2 = [0.2, 0.4, 0.5, 0.1]
    alive_vec2 = [False, True, False, True]
    reg_vec3 = [0.3, 0.2, 0.0, 0.25]
    alive_vec3 = [False, True, False, True]

    reg1 = op_regularizer_stub.OpRegularizerStub(reg_vec1,
                                                 alive_vec1)

# Path: morph_net/framework/probabilistic_grouping_regularizer.py
# class ProbabilisticGroupingRegularizer(generic_regularizers.OpRegularizer):
#   def __init__(self, regularizers_to_group):
#   def regularization_vector(self):
#   def alive_vector(self):
# 
# Path: morph_net/testing/op_regularizer_stub.py
# class OpRegularizerStub(generic_regularizers.OpRegularizer):
# class OpRegularizerStubFactory(object):
#   def __init__(self, regularization_vector, alive_vector):
#   def regularization_vector(self):
#   def alive_vector(self):
#   def __init__(self, alive_stub_dict, reg_stub_dict):
#   def _create_stub(self, key):
#   def create_conv2d_regularizer(self, conv_op, manager=None):
# def image_stub():


# Path: morph_net/framework/probabilistic_grouping_regularizer_test.py
from morph_net.framework import probabilistic_grouping_regularizer as pgr
from morph_net.testing import op_regularizer_stub
import tensorflow.compat.v1 as tf

"""Tests for framework.probabilistic_grouping_regularizer."""

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



class ProbabilisticGroupingRegularizerTest(tf.test.TestCase):

  def testProbGroupingRegularizer(self):
    reg_vec1 = [0.1, 0.3, 0.6, 0.2]
    alive_vec1 = [False, True, True, False]
    reg_vec2 = [0.2, 0.4, 0.5, 0.1]
    alive_vec2 = [False, True, False, True]
    reg_vec3 = [0.3, 0.2, 0.0, 0.25]
    alive_vec3 = [False, True, False, True]

    reg1 = op_regularizer_stub.OpRegularizerStub(reg_vec1,
                                                 alive_vec1)

    reg2 = op_regularizer_stub.OpRegularizerStub(reg_vec2,