2aa4002bf26215c9afae9390105c53a399f58055,niftynet/engine/application_driver.py,ApplicationDriver,run_application,#ApplicationDriver#,194

Before Change


        with tf.Session(config=config, graph=self.graph) as session:

            tf.logging.info("Filling queues (this can take a few minutes)")
            self._coord = tf.train.Coordinator()

            // start samplers" threads
            try:
                samplers = self.app.get_sampler()
                if samplers is not None:
                    all_samplers = [s for sets in samplers for s in sets]
                    for sampler in all_samplers:
                        sampler.run_threads(
                            session, self._coord, self.num_threads)
            except (TypeError, AttributeError, IndexError):
                tf.logging.fatal(
                    "samplers not running, pop_batch_op operations "
                    "are blocked.")
                raise

            self.graph = self._create_graph(self.graph)
            self.app.check_initialisations()

            // initialise network

After Change


                "are blocked.")
            raise

    def run_application(self):
        
        Initialise a TF graph, connect data sampler and network within
        the graph context, run training loops or inference loops.

        The training loop terminates when ``self.final_iter`` reached.
        The inference loop terminates when there is no more
        image sample to be processed from image reader.

        :return:
        
        config = ApplicationDriver._tf_config()
        with tf.Session(config=config, graph=self.graph) as session:

            tf.logging.info("Filling queues (this can take a few minutes)")
            self._coord = tf.train.Coordinator()

            // start samplers" threads
            self._run_sampler_threads(session=session)

            self.graph = self._create_graph(self.graph)
            self.app.check_initialisations()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 27

Instances


Project Name: NifTK/NiftyNet
Commit Name: 2aa4002bf26215c9afae9390105c53a399f58055
Time: 2018-01-23
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: run_application


Project Name: NifTK/NiftyNet
Commit Name: d9d4e748db9d4db46b4a1f737e2d6533f9c2affe
Time: 2018-01-24
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: run_application


Project Name: NifTK/NiftyNet
Commit Name: 2aa4002bf26215c9afae9390105c53a399f58055
Time: 2018-01-23
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: run_application


Project Name: NifTK/NiftyNet
Commit Name: 9ecedaecc46370578a0deddd9e6d6f88a734d395
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: run_application