ONNX Network as PyTorch Network

ONNX was not available so I tried to convert the NN from ONNX to Pytroch with ONNX2pytorch

ONNX was not available so I tried to convert the NN from ONNX to Pytroch with onnx2torch

The conversion worked like a charm:

import huggingface_hub
from onnx import load
from onnx2torch import convert

model_repo, model_filename = 'SmilingWolf/wd-v1-4-convnextv2-tagger-v2', 'model.onnx'
onnx_model = load(huggingface_hub.hf_hub_download(model_repo, model_filename))

pytorch_model = convert(onnx_model).cuda(device)

But the execution does not. Obivously onnx2torch is not mature enough to deal with the transformations in this  NN.