def __init__(self, gamma_threshold): """Creates an instance. Args: gamma_threshold: A float scalar, will be used as a 'gamma_threshold' for all the GammaL1Regularizer-s created by this class. """ self._gamma_conv_mapper = gamma_mapper.ConvGammaMapperByName() self._gamma_threshold = gamma_threshold
def createMapper(self, connectivity): if connectivity: return gamma_mapper.ConvGammaMapperByConnectivity() return gamma_mapper.ConvGammaMapperByName()