aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/integration/onnx-model/files/create_unbound_model.py
blob: 692ebce22a8311011625215302430f1906974dcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

import onnx
from onnx import helper, TensorProto

INPUT = helper.make_tensor_value_info('input', TensorProto.FLOAT, [-1, 2])
OUTPUT = helper.make_tensor_value_info('output', TensorProto.FLOAT, [-1, 2])

nodes = [helper.make_node('Identity', ['input'], ['output'])]
graph_def = helper.make_graph( nodes, 'simple_scoring', [INPUT], [OUTPUT])
model_def = helper.make_model(graph_def, producer_name='create_unbound_model.py')
onnx.save(model_def, 'unbound_model.onnx')