mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
fix convert_common version retrival (#6382)
This commit is contained in:
parent
baac7c91e2
commit
ac36596fb8
1 changed files with 2 additions and 2 deletions
|
|
@ -408,9 +408,9 @@ class OnnxModel:
|
|||
""" Convert a graph to FLOAT16
|
||||
"""
|
||||
from packaging.version import Version
|
||||
import onnxconverter_common.float16 as oc
|
||||
import onnxconverter_common as oc
|
||||
if Version(oc.__version__) > Version("1.7.0"):
|
||||
self.model = oc.convert_float_to_float16(self.model, keep_io_types=cast_input_output)
|
||||
self.model = oc.float16.convert_float_to_float16(self.model, keep_io_types=cast_input_output)
|
||||
return
|
||||
|
||||
graph = self.model.graph
|
||||
|
|
|
|||
Loading…
Reference in a new issue