MCPcopy Index your code
hub / github.com/hanzhanggit/StackGAN / evaluate

Method evaluate

stageI/trainer.py:438–452  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

436 count += self.batch_size
437
438 def evaluate(self):
439 config = tf.ConfigProto(allow_soft_placement=True)
440 with tf.Session(config=config) as sess:
441 with tf.device("/gpu:%d" % cfg.GPU_ID):
442 if self.model_path.find('.ckpt') != -1:
443 self.init_opt()
444 print("Reading model parameters from %s" % self.model_path)
445 saver = tf.train.Saver(tf.all_variables())
446 saver.restore(sess, self.model_path)
447 # self.eval_one_dataset(sess, self.dataset.train,
448 # self.log_dir, subset='train')
449 self.eval_one_dataset(sess, self.dataset.test,
450 self.log_dir, subset='test')
451 else:
452 print("Input a valid model path.")

Callers 1

run_exp.pyFile · 0.45

Calls 2

init_optMethod · 0.95
eval_one_datasetMethod · 0.95

Tested by

no test coverage detected