onnx2keras
onnx2keras copied to clipboard
Convert ONNX model graph to Keras model format.
Using an ONNX model made from keras2onnx resulted in the error discussed here: https://github.com/nerox8664/onnx2keras/issues/23 So, I went and fixed the code to work for such models. I left the old...
Hi, I am trying to convert from a model from onnx as: `from onnx2keras import onnx_to_keras import onnx onnx_model = onnx.load('interhand.onnx') k_model = onnx_to_keras(onnx_model, ['img'])` Following error is generated. Does...
``` import onnx import torch from onnx2keras import onnx_to_keras # Load ONNX model model = onnx.load('ONNX/tensorflow-onnx/output/model.onnx') # Call the converter (input - is the main model input name, can be...
I use the following code to convert from Pytorch to Tensorflow however accuracy drop after convert. ```python def pytorch_to_keras( self, model, input_shapes=None, change_ordering=True, verbose=False, name_policy=None, ): input = torch.randn([100, *image_size(DATASET_NAME)])...
I know this is an experimental feature, but as I need it, I have performed some tests and identified the two following issues, for which I can propose a correction....
It appears that the "mode" parameter in ONNX padding layers is optional, and a default 'constant' value is to be considered in this case (see in [https://github.com/onnx/onnx/blob/master/docs/Operators.md#Pad]). I have a...
DEBUG:onnx2keras:... DEBUG:onnx2keras:Check if all inputs are available: DEBUG:onnx2keras:Check input 0 (name 346). DEBUG:onnx2keras:Check input 1 (name 347). DEBUG:onnx2keras:Check input 2 (name 348). DEBUG:onnx2keras:... found all, continue DEBUG:onnx2keras:concat:Concat numpy arrays. DEBUG:onnx2keras:Output...
ONNX has [deprecated UpSample op](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Upsample) since opset_version 10. The replacement op for Upsample is [Resize](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Resize), would be great to support that.
WARNING:onnx2keras:transpose:Can't permute batch dimension. Result may be wrong. ``` 25 layers[node_name] = np.transpose(layers[input_name], axes=params['perm']) 26 else: ---> 27 raise NotImplementedError('Can\'t modify this type of data') 28 else: 29 permute =...
I have a pretrained efficientnet in pytorch. I need to convert it to .h5 format. Both onnx2keras and pytorch2keras seem to work for default change_ordering. When change_ordering=True, I see the...