support init-frz-model for se_r and se_t#1144
Conversation
I just copied several codes from se_a, which can also be applied to se_r and se_t.
Codecov Report
@@ Coverage Diff @@
## devel #1144 +/- ##
=======================================
Coverage 75.66% 75.66%
=======================================
Files 88 89 +1
Lines 7034 7048 +14
=======================================
+ Hits 5322 5333 +11
- Misses 1712 1715 +3
Continue to review full report at Codecov.
|
Are they tested? Should these methods be put in |
Yes and they work fine.
At least the hybrid descriptor needs specific methods so I prefer not putting in Descriptor. However, both these descriptors has a same embedding network, so it is possible for them to share some methods (like those in this PR). So I would prefer adding another base class for them. |
deepmd/utils/graph.py
Outdated
| """ | ||
| embedding_net_nodes = {} | ||
| embedding_net_pattern = f"filter_type_\d+{suffix}/matrix_\d+_\d+|filter_type_\d+{suffix}/bias_\d+_\d+|filter_type_\d+{suffix}/idt_\d+_\d+|filter_type_all{suffix}/matrix_\d+_\d+|filter_type_all{suffix}/bias_\d+_\d+|filter_type_all{suffix}/idt_\d+_\d" | ||
| embedding_net_pattern = f"filter_type_\d+{suffix}/matrix_\d+_\d+|filter_type_\d+{suffix}/bias_\d+_\d+|filter_type_\d+{suffix}/idt_\d+_\d+|filter_type_all{suffix}/matrix_\d+_\d+|filter_type_all{suffix}/matrix_\d+_\d+_\d+|filter_type_all{suffix}/bias_\d+_\d+|filter_type_all{suffix}/bias_\d+_\d+_\d+|filter_type_all{suffix}/idt_\d+_\d" |
There was a problem hiding this comment.
I just added filter_type_all{suffix}/matrix_\d+_\d+_\d+ and filter_type_all{suffix}/bias_\d+_\d+_\d+ to support se_e3. @denghuilu I have two questions:
- The pattern is too complex now. Is it possible to use something like
filter_type_*/*to get all these things. - Is
filter_type_all{suffix}/idt_\d+_\da typo offilter_type_all{suffix}/idt_\d+_\d+?
There was a problem hiding this comment.
I just added
filter_type_all{suffix}/matrix_\d+_\d+_\d+andfilter_type_all{suffix}/bias_\d+_\d+_\d+to supportse_e3. @denghuilu I have two questions:
- The pattern is too complex now. Is it possible to use something like
filter_type_*/*to get all these things.- Is
filter_type_all{suffix}/idt_\d+_\da typo offilter_type_all{suffix}/idt_\d+_\d+?
-
I think the answer is no, we also have nodes like
filter_type_1/add_5, filter_type_1/Tanh_3, filter_type_1/matrix_2_1/readwithin the graph, -
Yes, It's a typo
There was a problem hiding this comment.
Ok, I pushed a commit to fix this typo.
I just copied several codes from se_a, which can also be applied to se_r and se_t.