Skip to content

Instantly share code, notes, and snippets.

View geoffsmith's full-sized avatar

Geoff Smith geoffsmith

View GitHub Profile
@geoffsmith
geoffsmith / test_pixelshuffle.py
Created June 12, 2019 12:41
Example showing PixelShuffle ONNX export doesn't use same ordering as PyTorch
import onnx
import torch
from caffe2.python.onnx import backend
from torch import nn
from torch.autograd import Variable
from torch.nn import PixelShuffle
class MyPixelShuffle(nn.Module):
"""
Alternative version of pixel shuffle that was copied from the C++ version