Beispiel #1
0
def test_fast__get_model_execution_graph_with_inputs():

    network_filter = "trivia.*:mnist.log_reg"

    for network in networks.iterator(network_filter):

        model = keras.models.Model(inputs=network["in"],
                                   outputs=network["out"])

        graph = kgraph.get_model_execution_graph(model, keep_input_layers=True)
        kgraph.print_model_execution_graph(graph)
Beispiel #2
0
def test_precommit__get_model_execution_graph_resnet50():

    network_filter = "imagenet.resnet50"

    for network in networks.iterator(network_filter):

        model = keras.models.Model(inputs=network["in"],
                                   outputs=network["out"])

        graph = kgraph.get_model_execution_graph(model)
        kgraph.print_model_execution_graph(graph)
Beispiel #3
0
def test_commit__get_model_execution_graph():

    network_filter = "mnist.*"

    for network in networks.iterator(network_filter):

        model = keras.models.Model(inputs=network["in"],
                                   outputs=network["out"])

        graph = kgraph.get_model_execution_graph(model)
        kgraph.print_model_execution_graph(graph)
Beispiel #4
0
    def runTest(self):
        np.random.seed(2349784365)
        K.clear_session()

        for network in networks.iterator(self._network_filter,
                                         clear_sessions=True):
            if six.PY2:
                self._apply_test(network)
            else:
                with self.subTest(network_name=network["name"]):
                    self._apply_test(network)
Beispiel #5
0
    def run_test(self):
        np.random.seed(2349784365)
        clear_session()

        for network in networks.iterator(self._network_filter, clear_sessions=True):
            self._apply_test(network)