Solved by ptrblck in post #2 
              
              
                The error message claims you are using numpy.int64 to specify the in_channels argument in an nn.Conv2d layer as seen here: 
# works
conv = nn.Conv2d(3, 3, 3, 1, 1)
torch.jit.script(conv)

# fails
conv = nn.Conv2d(np.int64(3), 3, 3, 1, 1)
torch.jit.script(conv)
> TypeError: 
 'numpy.int64' object in …