You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi~
i meet the error, TypeError: '>' not supported between instances of 'str' and 'int'. The error img is:
This is my script:
import numpy
import onnx_tool
#from onnx_tool import create_ndarray_f16 # or use numpy.ones(shape,numpy.float32) is ok
def create_ndarray_fp16(shape):
return numpy.ones(shape, dtype=numpy.float16)
hi~

i meet the error, TypeError: '>' not supported between instances of 'str' and 'int'. The error img is:
This is my script:
import numpy
import onnx_tool
#from onnx_tool import create_ndarray_f16 # or use numpy.ones(shape,numpy.float32) is ok
def create_ndarray_fp16(shape):
return numpy.ones(shape, dtype=numpy.float16)
modelpath = '/home/young.ruan/mode_analyze/onnxfiles/alpaca-onnx-7B-fp16/models/decoder-merge-0.onnx'
m = onnx_tool.Model(modelpath)
inputs = {'hidden_in': create_ndarray_fp16((1, 1, 4096)), 'attn_mask': create_ndarray_fp16((1, 1, 1, 32)),
'position_ids': create_ndarray_fp16((1, 1)), 'past_key_in': create_ndarray_fp16((1, 32, 31, 128)),
'past_value_in': create_ndarray_fp16((1, 32, 31, 128))}
m.graph.shape_infer(inputs)
m.graph.profile()
m.graph.print_node_map()
m.save_model('decoder-0_fp16_shapes.onnx')
Thanks for your help.
The text was updated successfully, but these errors were encountered: