Skip to content

Commit

Permalink
Merge pull request deepmodeling#559 from YWolfeee/devel
Browse files Browse the repository at this point in the history
Close loss normalization
  • Loading branch information
amcadmus committed Apr 23, 2021
2 parents 8a8f052 + 913f4e7 commit 759e4ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepmd/loss/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def build (self,
polar = model_dict[self.tensor_name]

# YWolfeee: get the 2 norm of label, i.e. polar_hat
normalized_term = tf.sqrt(tf.reduce_sum(tf.square(polar_hat)))
#normalized_term = tf.sqrt(tf.reduce_sum(tf.square(polar_hat)))
normalized_term = global_cvt_2_tf_float(1.0)

# YHT: added for global / local dipole combination
l2_loss = global_cvt_2_tf_float(0.0)
Expand Down

0 comments on commit 759e4ff

Please sign in to comment.