Reconstruct the interface of model compression#921
Reconstruct the interface of model compression#921amcadmus merged 12 commits intodeepmodeling:develfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## devel #921 +/- ##
==========================================
+ Coverage 75.42% 75.53% +0.11%
==========================================
Files 85 85
Lines 6730 6770 +40
==========================================
+ Hits 5076 5114 +38
- Misses 1654 1656 +2
Continue to review full report at Codecov.
|
|
I have another question. What is the behavior if one uses another JSON to restart the training? For example, in active learning cycles, we can continue training from the last iteration. |
The model will save the latest json file. |
In the In the |
njzjz
left a comment
There was a problem hiding this comment.
Also, please fix lint warnings.
|
deepmd-kit/deepmd/train/trainer.py Lines 288 to 307 in 425a896 Duplicated lines |
* remove dependences on training script and data from model compression * reset function update_one_sel in train.py * update the doc of model compression * fix bug in UT * optimize code for reviewer's comments * undo changes to constant variables * Update common.py * update code structure of DPTrainer * fix lint warnings in common.py * fix duplicated lines within trainer.py * Update trainer.py * rm default values with False optional in argcheck.py
deepmodeling#921 discussed that the tensors are compressed in the graph file. But it looks no... So at least we remove white space.
#921 discussed that the tensors are compressed in the graph file. But it looks no... So at least we remove white space.
deepmodeling#921 discussed that the tensors are compressed in the graph file. But it looks no... So at least we remove white space.
Before this pull request, the model compression module within the deepmd-kit would require the users to provide the training script as well as the training data to compress a given frozen model. Herein, this pull request brings a more useful and robust interface of model compression, which removes the dependences on training script and data from the model compression.
The main changes are:
dp compress -i original.pb -o compress.pbinstead ofdp compress input.json -i original.pb -o compress.pb.The next pull request will add an item within the convert-from interface to allow the users to upgrade their existing frozen models to adapt the new interface of model compression.