Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recover input stats from frozen models #1482

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Feb 18, 2022

Before, only NN parameters were recovered.

Before, only NN parameters were recovered.
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Merging #1482 (8cb3ca1) into devel (33a1dfa) will increase coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel    #1482      +/-   ##
==========================================
+ Coverage   75.99%   76.02%   +0.02%     
==========================================
  Files          93       93              
  Lines        7674     7711      +37     
==========================================
+ Hits         5832     5862      +30     
- Misses       1842     1849       +7     
Impacted Files Coverage Δ
deepmd/descriptor/se.py 66.66% <33.33%> (-6.07%) ⬇️
deepmd/descriptor/loc_frame.py 96.21% <50.00%> (-1.43%) ⬇️
deepmd/train/trainer.py 74.53% <100.00%> (+0.11%) ⬆️
source/op/_gelu.py 69.23% <0.00%> (-12.59%) ⬇️
deepmd/descriptor/se_a_ef.py 55.02% <0.00%> (-0.30%) ⬇️
source/op/_tabulate_grad.py 100.00% <0.00%> (ø)
source/op/_prod_force_grad.py 100.00% <0.00%> (ø)
source/op/_prod_virial_grad.py 100.00% <0.00%> (ø)
source/op/_soft_min_force_grad.py 100.00% <0.00%> (ø)
source/op/_prod_force_se_a_grad.py 100.00% <0.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33a1dfa...8cb3ca1. Read the comment docs.

@wanghan-iapcm wanghan-iapcm merged commit 17d1443 into deepmodeling:devel Feb 19, 2022
@njzjz njzjz deleted the recover_stat branch February 19, 2022 16:56
The suffix of the scope
"""
self.davg = get_tensor_by_name(model_file, 'descrpt_attr%s/t_avg' % suffix)
self.tavg = get_tensor_by_name(model_file, 'descrpt_attr%s/t_std' % suffix)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found I made a typo here
tavg -> dstd

njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Mar 14, 2022
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Mar 14, 2022
commit 12e224b
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 18:17:20 2022 -0400

    adjust variable name

commit 6ac8207
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 17:58:29 2022 -0400

    add unittests

commit 1dcc218
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 17:38:02 2022 -0400

    supports increasing sel

commit 1f1fcda
Merge: 58a5dfd d8a0844
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 17:01:41 2022 -0400

    Merge branch 'devel' into adjust_sel

commit 58a5dfd
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 17:01:14 2022 -0400

    support recovering sel<original_sel

commit a6ee102
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 16:25:55 2022 -0400

    fix a typo in deepmodeling#1482

commit 65dd1ab
Author: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Date:   Mon Mar 14 02:18:53 2022 -0400

    save checkpoints after training if it's not saved
@@ -106,6 +106,8 @@ def init_variables(self,
The suffix of the scope
"""
self.embedding_net_variables = get_embedding_net_variables(model_file, suffix = suffix)
self.davg = get_tensor_by_name(model_file, 'descrpt_attr%s/t_avg' % suffix)
self.tavg = get_tensor_by_name(model_file, 'descrpt_attr%s/t_std' % suffix)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same typo introduced here....

wanghan-iapcm pushed a commit that referenced this pull request Mar 15, 2022
* save checkpoints after training if it's not saved

* fix a typo in #1482

* support recovering sel<original_sel

* supports increasing sel

* add unittests

* adjust variable name

* add doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants