Skip to content

Commit

Permalink
add precision arguments explicitly to examples (#2659)
Browse files Browse the repository at this point in the history
Set precision=float32 for NNs in examples, since we have found that
float64 and float32 have the same accuracy in almost all the situation.
  • Loading branch information
njzjz authored Jul 11, 2023
1 parent d3d3c18 commit e1fe470
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/dos/train/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"resnet_dt": false,
"axis_neuron": 8,
"precision": "float64",
"seed": 1
},
"fitting_net": {
Expand All @@ -29,6 +30,7 @@
],
"resnet_dt": true,
"numb_fparam": 0,
"precision": "float64",
"seed": 1
}
},
Expand Down
2 changes: 2 additions & 0 deletions examples/fparam/train/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
],
"resnet_dt": false,
"axis_neuron": 8,
"precision": "float64",
"seed": 1
},
"fitting_net": {
Expand All @@ -26,6 +27,7 @@
],
"resnet_dt": true,
"numb_fparam": 1,
"precision": "float64",
"seed": 1
}
},
Expand Down
2 changes: 2 additions & 0 deletions examples/fparam/train/input_aparam.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
],
"resnet_dt": false,
"axis_neuron": 8,
"precision": "float64",
"seed": 1
},
"fitting_net": {
Expand All @@ -26,6 +27,7 @@
],
"resnet_dt": true,
"numb_aparam": 1,
"precision": "float64",
"seed": 1
}
},
Expand Down
2 changes: 2 additions & 0 deletions examples/nopbc/mixed/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"resnet_dt": false,
"axis_neuron": 12,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -28,6 +29,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/spin/se_e2_a/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -30,6 +31,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/dplr/train/dw.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 8,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -34,6 +35,7 @@
128
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/dplr/train/ener.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 8,
"precision": "float64",
"seed": 3458359619,
"_comment": " that's all"
},
Expand All @@ -30,6 +31,7 @@
128
],
"resnet_dt": true,
"precision": "float64",
"seed": 108835393,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/hybrid/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
],
"resnet_dt": false,
"axis_neuron": 4,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -40,6 +41,7 @@
20
],
"resnet_dt": false,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
}
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_atten/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"attn_layer": 2,
"attn_dotr": true,
"attn_mask": false,
"precision": "float64",
"_comment": " that's all"
},
"fitting_net": {
Expand All @@ -32,6 +33,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_atten_compressible/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"attn_layer": 0,
"attn_dotr": true,
"attn_mask": false,
"precision": "float64",
"_comment": " that's all"
},
"fitting_net": {
Expand All @@ -32,6 +33,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_atten_dpa1_compat/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"attn_layer": 2,
"attn_dotr": true,
"attn_mask": false,
"precision": "float64",
"_comment": " that's all"
},
"fitting_net": {
Expand All @@ -32,6 +33,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_e2_a/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -30,6 +31,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/water/se_e2_a_mixed_prec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
"mixed_precision": {
"compute_prec": "float16",
"output_prec": "float32"
"output_prec": "float64"
},
"numb_steps": 1000000,
"seed": 10,
Expand Down
3 changes: 3 additions & 0 deletions examples/water/se_e2_a_tebd/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
8
],
"resnet_dt": false,
"precision": "float64",
"seed": 1
},
"descriptor": {
Expand All @@ -30,6 +31,7 @@
"resnet_dt": false,
"axis_neuron": 16,
"type_one_side": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -40,6 +42,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_e2_r/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
20
],
"resnet_dt": false,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -29,6 +30,7 @@
120
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": "that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/se_e3/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
8
],
"resnet_dt": false,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -26,6 +27,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water/zbl/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
],
"resnet_dt": false,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -34,6 +35,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
3 changes: 3 additions & 0 deletions examples/water_multi_task/ener_dipole/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -35,6 +36,7 @@
100
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -45,6 +47,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
}
Expand Down
2 changes: 2 additions & 0 deletions examples/water_tensor/dipole/dipole_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"resnet_dt": false,
"axis_neuron": 6,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -34,6 +35,7 @@
100
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/water_tensor/polar/polar_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"resnet_dt": false,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -36,6 +37,7 @@
100
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand Down
2 changes: 2 additions & 0 deletions examples/zinc_protein/zinc_se_a_mask.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
],
"resnet_dt": true,
"axis_neuron": 16,
"precision": "float64",
"seed": 1,
"_comment": " that's all"
},
Expand All @@ -37,6 +38,7 @@
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"numb_aparam": 1,
"use_aparam_as_mask": true,
Expand Down

0 comments on commit e1fe470

Please sign in to comment.