Skip to content

TypeError: unhashable type: 'google.protobuf.pyext._message.RepeatedScalarContaine' #23

@emanuelcovaci

Description

@emanuelcovaci

I try to convert an ONNX model to Keras, but when I call the conversion function I receive the following error message "TypeError: unhashable type: 'google.protobuf.pyext._message.RepeatedScalarContainer'"

You can see the ONNX Model here: https://ibb.co/sKnbxWY

import onnx2keras
from onnx2keras import onnx_to_keras
import keras
import onnx

onnx_model = onnx.load('onnxModel.onnx')
k_model = onnx_to_keras(onnx_model, ['input_1'])

keras.models.save_model(k_model,'kerasModel.h5',overwrite=True,include_optimizer=True)
File "C:/../onnx2Keras.py", line 7, in <module>
    k_model = onnx_to_keras(onnx_model, ['input_1'])
  File "..\site-packages\onnx2keras\converter.py", line 80, in onnx_to_keras
    weights[onnx_extracted_weights_name] = numpy_helper.to_array(onnx_w)
TypeError: unhashable type: 'google.protobuf.pyext._message.RepeatedScalarContainer'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions