Skip to content

Issue with pad layer, keyword 'constant' unexpected  #29

@matthew-fotech

Description

@matthew-fotech
 
layer.weight.data = torch.from_numpy(numpy_helper.to_array(weight))
Traceback (most recent call last):
 File "/Users/fotech/Onnx-pytorch.py", line 7, in <module>
 pytorch_model = ConvertModel(onnx_model)
 File "/Users/fotech/opt/anaconda3/envs/onnx_ML/lib/python3.9/site-packages/onnx2pytorch/convert/model.py", line 122, in __init__
    for op_id, op_name, op in convert_operations(
 File "/Users/fotech/opt/anaconda3/envs/onnx_ML/lib/python3.9/site-packages/onnx2pytorch/convert/operations.py", line 190, in convert_operations
    op = Pad(**extract_attributes(node))
TypeError: __init__() got an unexpected keyword argument 'constant'

got this error when trying to run ConvertModel using the process described in the readme, any idea what might be causing it?

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