b416d92cda9c31a517ad3d10a0d453f9acc61093,deepmedic/frontEnd/testSession.py,TestSession,run_session,#TestSession#,81

Before Change


                self._ask_user_if_test_with_random() // Asks user whether to continue with randomly initialized model. It exits if no is given.
                self._log.print3("")
                self._log.print3("=========== Initializing network variables  ===============")
                tf.compat.v1.variables_initializer( var_list = tf.compat.v1.get_collection(tf.compat.v1.GraphKeys.GLOBAL_VARIABLES, scope="net") ).run()
                self._log.print3("Model variables were initialized.")
                
                

After Change


            cnn3d.setup_ops_n_feeds_to_test( self._log,
                                             self._params.indices_fms_per_pathtype_per_layer_to_save )
            // Create the saver
            collection_vars_net = tf.compat.v1.get_collection(tf.compat.v1.GraphKeys.GLOBAL_VARIABLES, scope="net")
            saver_net = tf.compat.v1.train.Saver(var_list=collection_vars_net) // saver_net would suffice
            dict_vars_net = {"net_var"+str(i): v for i, v in enumerate(collection_vars_net)}
            ckpt_net = tf.train.Checkpoint(**dict_vars_net)
            
        with tf.compat.v1.Session( graph=graphTf, config=tf.compat.v1.ConfigProto(log_device_placement=False, device_count={"CPU":999, "GPU":99}) ) as sessionTf:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Kamnitsask/deepmedic
Commit Name: b416d92cda9c31a517ad3d10a0d453f9acc61093
Time: 2020-01-05
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/frontEnd/testSession.py
Class Name: TestSession
Method Name: run_session


Project Name: NervanaSystems/coach
Commit Name: d6795bd5245ba18604ce1b1ffa9fbee9c8ce7778
Time: 2019-06-23
Author: gal.leibovich@intel.com
File Name: rl_coach/architectures/tensorflow_components/general_network.py
Class Name: GeneralTensorFlowNetwork
Method Name: get_model


Project Name: tensorflow/transform
Commit Name: 96e4af6e86e93da021c29a4273dcdfaeab8fdfcf
Time: 2017-08-07
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/pretrained_models.py
Class Name:
Method Name: apply_saved_model