Skip to content

Commit 63baa30

Browse files
authored
undo reset lcurve.out during the model compression process (#1080)
1 parent 75160c7 commit 63baa30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

deepmd/train/trainer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,9 @@ def _init_session(self):
408408
if self.run_opt.init_mode == 'init_from_scratch' :
409409
log.info("initialize model from scratch")
410410
run_sess(self.sess, init_op)
411-
fp = open(self.disp_file, "w")
412-
fp.close ()
411+
if not self.is_compress:
412+
fp = open(self.disp_file, "w")
413+
fp.close ()
413414
elif self.run_opt.init_mode == 'init_from_model' :
414415
log.info("initialize from model %s" % self.run_opt.init_model)
415416
run_sess(self.sess, init_op)

0 commit comments

Comments
 (0)