Hi, I’m trying to make a script for a model trained on cifar-10.
scripted_model = torch.jit.script(model, torch.rand(1,3,32,32))

I get the following error:
TypeError:
'numpy.int64' object in attribute 'Conv2d.in_channels' is not a valid constant.
Valid constants are:
1. a nn.ModuleList
2. a value of type {bool, float, int, str, NoneType, torch.device, torch.layout, torch.dtype}
3. a list or tuple of (2)

I also tried using torch.jit.ScriptModule instead of nn.Module in the class definition of the model but it didn’t work.