diff --git a/testdata/dnn/onnx/data/input_mish.npy b/testdata/dnn/onnx/data/input_mish.npy new file mode 100644 index 000000000..75cc37ef6 Binary files /dev/null and b/testdata/dnn/onnx/data/input_mish.npy differ diff --git a/testdata/dnn/onnx/data/output_mish.npy b/testdata/dnn/onnx/data/output_mish.npy new file mode 100644 index 000000000..af3db1e2f Binary files /dev/null and b/testdata/dnn/onnx/data/output_mish.npy differ diff --git a/testdata/dnn/onnx/generate_onnx_models.py b/testdata/dnn/onnx/generate_onnx_models.py index 167b131aa..bc7732d2f 100644 --- a/testdata/dnn/onnx/generate_onnx_models.py +++ b/testdata/dnn/onnx/generate_onnx_models.py @@ -1224,4 +1224,12 @@ def forward(self, x): x = Variable(torch.randn(1, 2, 20, 20)) model = Conv1ResizePoold() -save_data_and_model("conv_resize_pool_1d", x, model) \ No newline at end of file +save_data_and_model("conv_resize_pool_1d", x, model) + +class Mish(nn.Module): + def forward(self, x): + return x * (torch.tanh(F.softplus(x))) + +x = Variable(torch.randn([1, 2, 2, 2])) +model = Mish() +save_data_and_model("mish", x, model) diff --git a/testdata/dnn/onnx/models/mish.onnx b/testdata/dnn/onnx/models/mish.onnx new file mode 100644 index 000000000..43f4ac284 --- /dev/null +++ b/testdata/dnn/onnx/models/mish.onnx @@ -0,0 +1,21 @@ +pytorch1.7:� + +01 +Softplus_0"Softplus + +12Tanh_1"Tanh + +0 +23Mul_2"Multorch-jit-exportZ +0 + + + + +b +3 + + + + +B \ No newline at end of file