Skip to content

Commit 41fd7e8

Browse files
committed
add generator
1 parent eba32dd commit 41fd7e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,3 +2573,12 @@ def make_node_with_constant(op_type, constant_value, inputs=None, outputs=None,
25732573

25742574
gen_layer_norm_expanded()
25752575
gen_layer_norm_expanded(constant_as_initializers=True)
2576+
2577+
################# GELU #################
2578+
2579+
x = torch.randn(1, 5, 20)
2580+
gelu = nn.GELU()
2581+
save_data_and_model("gelu", x, gelu)
2582+
2583+
gelu_approximation = nn.GELU('tanh')
2584+
save_data_and_model("gelu_approximation", x, gelu_approximation)

0 commit comments

Comments
 (0)