def __init__(self, *args, **kwargs): """ Constructor. """ super(NNConstraintCheckerTestCase, self).__init__(*args, **kwargs) self.nns = generate_cnn_architectures() + generate_mlp_architectures() self.cnn_constraint_checker = nn_constraint_checkers.CNNConstraintChecker( 25, 5, 500000, 0, 5, 2, 15, 512, 16, 4) self.mlp_constraint_checker = nn_constraint_checkers.MLPConstraintChecker( 25, 5, 500000, 900, 5, 2, 15, 30, 8)
def __init__(self, *args, **kwargs): """ Constructor. """ super(NNModifierTestCase, self).__init__(*args, **kwargs) self.cnns = generate_cnn_architectures() self.mlps = generate_mlp_architectures() self.save_dir = '../scratch/unittest_modifier_class/' self.cnn_constraint_checker = nn_constraint_checkers.CNNConstraintChecker( 50, 4, np.inf, 4.0, 5, 5, 100, 8000, 8) self.mlp_constraint_checker = nn_constraint_checkers.MLPConstraintChecker( 50, 4, np.inf, 4.0, 5, 5, 100, 8000, 8) self.cnn_modifier = nn_modifiers.NNModifier( self.cnn_constraint_checker) self.mlp_modifier = nn_modifiers.NNModifier( self.mlp_constraint_checker) self.modifier_wo_cc = nn_modifiers.NNModifier(None)