nn/deeplab.py
def load_resnet(self, resnet_dir):
        """
        Load the resnet101 model pretrained on ImageNet
        :param resnet_dir: path to the pretrained model
        :return:
        """
        with tf.Session(config=self.config) as sess:
            # init model
            init = [tf.global_variables_initializer(), tf.local_variables_initializer()]
            sess.run(init)
            restore_var = [v for v in tf.global_variables() if 'resnet_v1' in v.name and not 'Adam' in v.name]
            loader = tf.train.Saver(var_list=restore_var)
            # load model
            self.load(resnet_dir, sess, loader)

        Load the resnet101 model pretrained on ImageNet
        :param resnet_dir: path to the pretrained model
        :return:
        
Load the resnet101 model pretrained on ImageNet
Load the resnet101 model pretrained on ImageNet
def load_resnet(self, resnet_dir):
        with tf.Session(config=self.config) as sess:
            init = [tf.global_variables_initializer(), tf.local_variables_initializer()]
            sess.run(init)
            restore_var = [v for v in tf.global_variables() if 'resnet_v1' in v.name and not 'Adam' in v.name]
            loader = tf.train.Saver(var_list=restore_var)
            self.load(resnet_dir, sess, loader)
def load_resnet ( self , resnet_dir ) : with tf . Session ( config = self . config ) as sess : init = [ tf . global_variables_initializer ( ) , tf . local_variables_initializer ( ) ] sess . run ( init ) restore_var = [ v for v in tf . global_variables ( ) if 'resnet_v1' in v . name and not 'Adam' in v . name ] loader = tf . train . Saver ( var_list = restore_var ) self . load ( resnet_dir , sess , loader )
Load the resnet101 model pretrained on ImageNet
Load the resnet101 model pretrained on ImageNet
"""
        Load the resnet101 model pretrained on ImageNet
        :param resnet_dir: path to the pretrained model
        :return:
        """ # init model # load model
None
self
resnet_dir
path to the pretrained model
path to the pretrained model