Skip to content

Commit d6263b1

Browse files
committed
add generator
1 parent 7c5a8b7 commit d6263b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,3 +2441,13 @@ def generate_onnx_single_operator(single_op, onnx_name, save_prefix="./models"):
24412441
)
24422442

24432443
generate_onnx_single_operator(tile, "tile")
2444+
2445+
2446+
################# GELU #################
2447+
2448+
x = torch.randn(1, 5, 20)
2449+
gelu = nn.GELU()
2450+
save_data_and_model("gelu", x, gelu)
2451+
2452+
gelu_approximation = nn.GELU('tanh')
2453+
save_data_and_model("gelu_approximation", x, gelu_approximation)

0 commit comments

Comments
 (0)