onnx2torch icon indicating copy to clipboard operation
onnx2torch copied to clipboard

PermissionError: [Errno 13] Permission denied: 'D:\\github codes\\model conversion\\tmp25msoka9'

Open qaixerabbas opened this issue 2 years ago • 4 comments

Here's my code

import torch
from onnx2torch import convert

# Path to ONNX model
onnx_model_path = 'tfmodel.onnx'

torch_model_1 = convert(onnx_model_path)

When I run the script following error occurs

snap

Is this because of Windows permissions or a bug in code? I tried to run the cmd as admin but no success.

qaixerabbas avatar Feb 23 '23 15:02 qaixerabbas

Hey @qaixerabbas ,

I implemented your issue in windows using the same code.

Very unfortunately, I haven't located the problematic code yet, but you can solve the problem in this way.

import onnx
from onnx2torch import convert

# Path to ONNX model
onnx_model_path = 'tfmodel.onnx'
onnx_model = onnx.load(onnx_model_path)

torch_model_1 = convert(onnx_model)

p.s. The problem dont exist in Ubuntu Linux and Arch Linux

JohnMasoner avatar Feb 24 '23 05:02 JohnMasoner

@JohnMasoner Thanks for the help. I think I was not loading the model and I was trying to convert the file.

qaixerabbas avatar Mar 27 '23 06:03 qaixerabbas

Hey @qaixerabbas ,

I implemented your issue in windows using the same code.

Very unfortunately, I haven't located the problematic code yet, but you can solve the problem in this way.

import onnx
from onnx2torch import convert

# Path to ONNX model
onnx_model_path = 'tfmodel.onnx'
onnx_model = onnx.load(onnx_model_path)

torch_model_1 = convert(onnx_model)

p.s. The problem dont exist in Ubuntu Linux and Arch Linux

I used the same code you provided and got "Converter is not implemented (OperationDescription(domain='', operation_type='Loop', version=13))"

MathewsJosh avatar Apr 30 '23 15:04 MathewsJosh

Hey @qaixerabbas , I implemented your issue in windows using the same code. Very unfortunately, I haven't located the problematic code yet, but you can solve the problem in this way.

import onnx
from onnx2torch import convert

# Path to ONNX model
onnx_model_path = 'tfmodel.onnx'
onnx_model = onnx.load(onnx_model_path)

torch_model_1 = convert(onnx_model)

p.s. The problem dont exist in Ubuntu Linux and Arch Linux

I used the same code you provided and got "Converter is not implemented (OperationDescription(domain='', operation_type='Loop', version=13))"

#150

JohnMasoner avatar Aug 06 '23 23:08 JohnMasoner