onnx2pytorch
onnx2pytorch copied to clipboard
DepthToSpace
Currently DepthToSpace throws a NotImplemented error, any plan to support this?
Thanks
Do you have a link to a public ONNX model that uses this op?
The main application for this is super-resolution, however a quick google didn't throw up anything using it. Nice description of the operation here . I'm not able to share our model at the moment, sorry.
Thanks! I'm hoping to circle back with some other updates to onnx2pytorch around December-January, and will try to address this if it's not already implemented by then. But for what it's worth, as a non-maintainer/user who recently started contributing, it's quite easy to add this as a supported op. You'd just need to translate that numpy code into pytorch and place it as a new nn.Module in onnx2pytorch/operations/depthtospace.py.
You can add the new operation as described by Calvin. You should also add the tests to make sure the operation is doing what it should. You can copy the tests/examples from here. It looks like pytorch has this operation already implemented under pixel shuffle.
what should i do if i want to support some layer in this repo and recompile a whl.