Пример #1
0
 def restore(self):
     network.restore(self.sess, FLAGS.attack_networks[0])
     RHP_variables = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES,
                                       scope='RHP')
     RHP_variables_saver = tf.train.Saver(RHP_variables)
     ckpt_filename = tf.train.latest_checkpoint(FLAGS.RHP_savepath)
     RHP_variables_saver.restore(sess, ckpt_filename)
Пример #2
0
 def _run_init(self, sess):
     network.restore(sess, FLAGS.attack_networks[0])
     RHP_variables = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES,
                                       scope='RHP')
     init_variables_op = tf.variables_initializer(RHP_variables)
     sess.run(init_variables_op)
Пример #3
0
 def restore(self):
     for network_name in FLAGS.test_networks:
         network.restore(self.sess, network_name)