Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions testdata/dnn/onnx/models/make_swish_onnx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import onnx
from onnx import helper, TensorProto

# Input
X = helper.make_tensor_value_info('x', TensorProto.FLOAT, [1, 5])
Y = helper.make_tensor_value_info('y', TensorProto.FLOAT, [1, 5])

# Swish node
node = helper.make_node(
'Swish',
inputs=['x'],
outputs=['y']
)

# Graph
graph = helper.make_graph(
[node],
'swish_graph',
[X],
[Y]
)

# Model
model = helper.make_model(graph, producer_name='opencv_test')

onnx.save(model, 'swish.onnx')
print("swish.onnx created")
11 changes: 11 additions & 0 deletions testdata/dnn/onnx/models/swish.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
 opencv_test:F

xy"Swish swish_graphZ
x


b
y


B
Expand Down