Skip to content

Commit

Permalink
replace tf.no_op
Browse files Browse the repository at this point in the history
`tf.no_op` has a strange pefermance issue... We need to use another tensor as placeholder.
  • Loading branch information
njzjz committed Jan 14, 2022
1 parent 71beca9 commit f3b7189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/loss/ener.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def build (self,
return l2_loss, more_loss

def eval(self, sess, feed_dict, natoms):
placeholder = tf.no_op()
placeholder = self.l2_l
run_data = [
self.l2_l,
self.l2_more['l2_ener_loss'] if self.has_e else placeholder,
Expand Down

0 comments on commit f3b7189

Please sign in to comment.