onnx2tflite
onnx2tflite copied to clipboard
ValueError: Unrecognized keyword arguments passed to Conv2D: {'weights': [array([[[[-0.16197614,
Hello, I would like to ask you about the code of the “From torchvision to tensorflow-lite” example in the readme file. When running, an error will be reported. When running your own onnx conversion, an error will also be reported. How to solve this problem?
model = torchvision.models.mobilenet_v2(True)
use default settings is ok
torch.onnx.export(model, _input, './mobilenetV2.onnx', opset_version=11) # or opset_version=13
from converter import onnx_converter
onnx_converter( onnx_model_path="./mnist.onnx", need_simplify=True, output_path="./", target_formats=['tflite'], # or ['keras'], ['keras', 'tflite'] weight_quant=False, int8_model=False, int8_mean=None, int8_std=None, image_root=None )
Checking 0/1...
Traceback (most recent call last):
File "E:\pycharm\minist\minist\onnx2tflite.py", line 3, in
[[-0.21044524, -0.01345028, 0.17069656, -0.15660217]],
hello, it's seems onnx_model_path args of onnx_converter function is not same to torch.onnx.export.
more, can you share mnist.onnx?
I lowered the tensorflow version to 12.0 and the error disappeared.
I lowered the tensorflow version to 12.0 and the error disappeared.
hi,but tensorflow do not have 12.0 version . Can you share what you did? thank you.
I lowered the tensorflow version to 12.0 and the error disappeared.
hi,but tensorflow do not have 12.0 version . Can you share what you did? thank you.
In pycharm->settings->project->python interpreter, I deleted the keras package and lowered tensorflow to 2.12.0
I lowered the tensorflow version to 12.0 and the error disappeared.
hi,but tensorflow do not have 12.0 version . Can you share what you did? thank you.
In pycharm->settings->project->python interpreter, I deleted the keras package and lowered tensorflow to 2.12.0
您好,我无法在我的pycharm的python interpreter中看到keras包和相关的tensorflow包,但是我在终端删除了keras,并将tensorflow降级为2.13.0(没有2.12.0),然而系统显示错误信息:ImportError: cannot import name 'keras' from 'tensorflow' (unknown location),这应该如何解决?
ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.1, 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0) ERROR: No matching distribution found for tensorflow==2.12.0