Skip to content

Commit

Permalink
add start_pref_pf and limit_pref_pf to loss Argument
Browse files Browse the repository at this point in the history
fix #1199
  • Loading branch information
njzjz authored Oct 9, 2021
1 parent d8acbb8 commit 3d2da57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepmd/utils/argcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ def loss_ener():
doc_limit_pref_v = limit_pref('virial')
doc_start_pref_ae = start_pref('atom_ener')
doc_limit_pref_ae = limit_pref('atom_ener')
doc_start_pref_pf = start_pref('atom_pref')
doc_limit_pref_pf = limit_pref('atom_pref')
doc_relative_f = 'If provided, relative force error will be used in the loss. The difference of force will be normalized by the magnitude of the force in the label with a shift given by `relative_f`, i.e. DF_i / ( || F || + relative_f ) with DF denoting the difference between prediction and label and || F || denoting the L2 norm of the label.'
return [
Argument("start_pref_e", [float,int], optional = True, default = 0.02, doc = doc_start_pref_e),
Expand All @@ -488,6 +490,8 @@ def loss_ener():
Argument("limit_pref_v", [float,int], optional = True, default = 0.00, doc = doc_limit_pref_v),
Argument("start_pref_ae", [float,int], optional = True, default = 0.00, doc = doc_start_pref_ae),
Argument("limit_pref_ae", [float,int], optional = True, default = 0.00, doc = doc_limit_pref_ae),
Argument("start_pref_pf", [float,int], optional = True, default = 0.00, doc = doc_start_pref_pf),
Argument("limit_pref_pf", [float,int], optional = True, default = 0.00, doc = doc_limit_pref_pf),
Argument("relative_f", [float,None], optional = True, doc = doc_relative_f)
]

Expand Down

0 comments on commit 3d2da57

Please sign in to comment.