loading pre trainned weights using variable name 2018, Dec 06 code example: # load all variables that are equal in name graph_variables = [v.name for v in tf.trainable_variables()] variables_names = [] for v in self.vgg_weights: if v.name in graph_variables: variables_names.append(v) # load all variables except for the last logic variables_names = [] for v in tf.trainable_variables(): if v.name == 'op_w_logits_b:0' or v.name == 'op_w_logits_w:0': break else: variables_names.append(v) # load store weights tf.train.Saver(variables_names).restore(sess, self.ckpt_location + self.ckpt_name) Manuel Cuevas Hello, I'm Manuel Cuevas a Software Engineer with background in machine learning and artificial intelligence. Subscribe here to get our latest updates Email Address Please enable JavaScript to view the comments powered by Disqus.