def test_enable_hidden_layers(self, model=None, layers=None): # for this test, it is best to use a new model instance on every call model = model or models.NetworkModel(self.graph) layers = layers or self._get_unenabled_hidden_layers(model) if len(layers) == 1: arg = layers[0] else: arg = layers model.enable_hidden_layer_output(arg) self.assertSetEqual(model.hidden_output_layers, set(layers))
def create_model(input_shapes, **optsettings): network = GithubNet2(input_shapes, **optsettings) return models.NetworkModel(network, **optsettings)
def create_model(input_shapes, **optsettings): network = MNISTNet(input_shapes, **optsettings) return models.NetworkModel(network, **optsettings)
def setUpClass(cls, model=None): cls.graph = mocks.MockNeuralNetwork() cls.model = model or models.NetworkModel(cls.graph) cls.inputs_dict = cls.graph.example_input