add model compression training support for deepmd-kit#1000
add model compression training support for deepmd-kit#1000amcadmus merged 10 commits intodeepmodeling:develfrom
Conversation
|
Documents for this new command are not included. |
I'll address it. |
iProzd
left a comment
There was a problem hiding this comment.
Now we :
- use tf.import_graph_def to initialize the tabulation table.
- manually initialiaze the fitting net by directly passing fitting variables to the optional constant_initializer in network.py (we did not use the same way in 1 because the fitting net in compressed training setting still needs to train).
Todo:
- remove the 'stage 3:transfer' in regular model compression process, due to above 2.
- add doc
Codecov Report
@@ Coverage Diff @@
## devel #1000 +/- ##
==========================================
- Coverage 83.27% 74.59% -8.68%
==========================================
Files 118 86 -32
Lines 9980 6921 -3059
==========================================
- Hits 8311 5163 -3148
- Misses 1669 1758 +89
Continue to review full report at Codecov.
|
add doc for init-frz-model at training-advanced.md
…uilu/deepmd-kit into model-compression-training
where is the doc? I couldn't find it. |
@jameswind see here. |
Fixes deepmodeling#1000. Add tests.
We have implemented the model compression support for the deepmd-kit package, which speedup the DP inference process by a factor of 4-15 times. At this PR we focus on the training support of the compressed model. The idea is that if we have got a DP compressed model, we could use it to initialize a new training graph, so that we could involve the compressed embedding-net within the new training process. This can typically speedup the example water system training process by more than 2 times.
By using the new
dp train init-frz-modelcommand, the output training lcurve.out of the compressed model(compressed.out) and the original model(original.out) show the same results:Results of the compressed.out:
Results of the compressed.out:
Therefore,
dp train init-frz-modelcommand can produce correct results for the compressed model within the training process.The main contributions of this PR are:
dp traininterface. Now users can usedp train input.json --init-frz-model compress.pbcommand to speedup the training process. Note that the init-frz-model command only support the compressed model currently.