Skip to content

Commit

Permalink
set IR VERSION on generated_model in rnn_benchmark (#2972)
Browse files Browse the repository at this point in the history
  • Loading branch information
smk2007 authored Feb 4, 2020
1 parent 0d7af33 commit 6cd3221
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions onnxruntime/core/providers/nuphar/scripts/rnn_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
import onnxruntime
from onnx import helper, numpy_helper
from onnx import shape_inference
from onnx import IR_VERSION
import os
from timeit import default_timer as timer

def generate_model(rnn_type, input_dim, hidden_dim, bidirectional, layers, model_name, batch_one=True, has_seq_len=False):
model = onnx.ModelProto()
model.ir_version = IR_VERSION

opset = model.opset_import.add()
opset.domain == 'onnx'
opset.version = 7
Expand Down

0 comments on commit 6cd3221

Please sign in to comment.