I meet this problem too(on iOS though). The model I use is from here but I use my own images for SRGAN.

  
      github.com
  
  
    leftthomas/SRGAN/blob/master/model.py 3
import math
import torch
from torch import nn


class Generator(nn.Module):
    def __init__(self, scale_factor):
        upsample_block_num = int(math.log(scale_factor, 2))

        super(Generator, self).__init__()
        self.block1 = nn.Sequential(
            nn.Conv2d(3, 64, kernel_size=9, padding=4),
            nn.PReLU()
        )
        self.block2 = ResidualBlock(64)
        self.block3 = ResidualBlock(64)
        self.block4 = ResidualBlock(64)
        self.block5 = ResidualBlock(64)
        self.block6 = ResidualBlock(64)
        self.block7 = nn.Sequential(


  This file has been truncated. show original

  
  
    
    
  
  


P.S. I tried onnx->coreml and onnx->tensorflow pb -> coreml and both way failed. Very frustrated as a beginner.