Examples/tensorflow/compression/spatial_svd.py
def finetune(self, sess: tf.Session, update_ops_name: List[str] = None):
        """
        Fine-tunes the session graph. The implementation provided here is just an example,
        provide your own implementation if needed.

        :param sess: The sess graph to fine-tune.
        :param update_ops_name: list of name of update ops (mostly BatchNorms' moving averages).
                                tf.GraphKeys.UPDATE_OPS collections is always used
                                in addition to this list
        """

        # Your code goes here instead of the example from below

        trainer = ImageNetTrainer(self._config.tfrecord_dir, training_inputs=['keras_learning_phase:0'],
                                  data_inputs=['input_1:0'], validation_inputs=['labels:0'],
                                  image_size=image_net_config.dataset['image_size'],
                                  batch_size=image_net_config.train['batch_size'],
                                  num_epochs=self._config.epochs, format_bgr=True)

        trainer.train(sess, update_ops_name=update_ops_name, learning_rate=self._config.learning_rate,
                      decay_steps=self._config.decay_steps)

        save_model_to_meta(sess, meta_path=os.path.join(self._config.logdir, 'finetuned_model'))

        Fine-tunes the session graph. The implementation provided here is just an example,
        provide your own implementation if needed.

        :param sess: The sess graph to fine-tune.
        :param update_ops_name: list of name of update ops (mostly BatchNorms' moving averages).
                                tf.GraphKeys.UPDATE_OPS collections is always used
                                in addition to this list
        
Fine-tunes the session graph. The implementation provided here is just an example,
provide your own implementation if needed.
Fine - tunes the session graph . The implementation provided here is just an example provide your own implementation if needed .
def finetune(self, sess: tf.Session, update_ops_name: List[str] = None):
        trainer = ImageNetTrainer(self._config.tfrecord_dir, training_inputs=['keras_learning_phase:0'],
                                  data_inputs=['input_1:0'], validation_inputs=['labels:0'],
                                  image_size=image_net_config.dataset['image_size'],
                                  batch_size=image_net_config.train['batch_size'],
                                  num_epochs=self._config.epochs, format_bgr=True)
        trainer.train(sess, update_ops_name=update_ops_name, learning_rate=self._config.learning_rate,
                      decay_steps=self._config.decay_steps)
        save_model_to_meta(sess, meta_path=os.path.join(self._config.logdir, 'finetuned_model'))
def finetune ( self , sess : tf . Session , update_ops_name : List [ str ] = None ) : trainer = ImageNetTrainer ( self . _config . tfrecord_dir , training_inputs = [ 'keras_learning_phase:0' ] , data_inputs = [ 'input_1:0' ] , validation_inputs = [ 'labels:0' ] , image_size = image_net_config . dataset [ 'image_size' ] , batch_size = image_net_config . train [ 'batch_size' ] , num_epochs = self . _config . epochs , format_bgr = True ) trainer . train ( sess , update_ops_name = update_ops_name , learning_rate = self . _config . learning_rate , decay_steps = self . _config . decay_steps ) save_model_to_meta ( sess , meta_path = os . path . join ( self . _config . logdir , 'finetuned_model' ) )
Fine-tunes the session graph.
Fine - tunes the session graph .
"""
        Fine-tunes the session graph. The implementation provided here is just an example,
        provide your own implementation if needed.

        :param sess: The sess graph to fine-tune.
        :param update_ops_name: list of name of update ops (mostly BatchNorms' moving averages).
                                tf.GraphKeys.UPDATE_OPS collections is always used
                                in addition to this list
        """ # Your code goes here instead of the example from below
self
sess
tf.Session
The sess graph to fine-tune.
The sess graph to fine - tune .
update_ops_name
List[str]
list of name of update ops (mostly BatchNorms' moving averages).
tf.GraphKeys.UPDATE_OPS collections is always used
in addition to this list
list of name of update ops ( mostly BatchNorms ' moving averages ) . tf . GraphKeys . UPDATE_OPS collections is always used in addition to this list