Deepmd in Paddle for example, just 'water_se_a' model #529
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deepmd in Paddle fo example, just
water_se_a
model.这是Paddle支持deepmd中
water_se_a
模型的示例写法代码:目前只针对生物计算的
water_se_a.json
单个模型,使用Paddle动态图进行训练、预测评估、3个自定义OP的支持。其他涉及到的模型代码均不进行改动。通过该代码对Deepmd
water_se_a.json
的结果记录如下:模型精度
1.模型训练
说明:使用Paddle动态图搭建网络,结构与Tensor Flow静态图保持完全一致,唯一只有网络参数初始化时不同(所有参数采用相同均值、方差、seed的Norm inItializer,但由于底层实现不同,Paddle与TF的初始值是不同的)
PaddlePaddle
TensorFlow
结论: 100万batch训练最终结果:
3.54e-02(pd) <-> 3.80e-02(tf)
)2.47e-04(pd) <-> 2.45e-04(tf)
)3.61e-02(pd) <-> 3.88e-02(tf)
)2.模型评估
说明:训练1000000个batch结束后,保存模型并加载,使用30帧测试数据进行模型评估。
PaddlePaddle
TensorFlow
模型评估结论:
模型性能
性能结论:
water_se_a
模型上,Paddle动态图要比TF静态图慢一些,训练100万batch大概需要11~12h;自定义OP精度
本次支持
water_se_a.json
模型中涉及到的prod_env_mat_a
、prod_force_se_a
、prod_virial_se_a
3个自定义OP,精度均与TF进行对齐。