In it's current state, you cannot convert CGNet to torchscript using torch.jit.script. This is due to how torchscript handles variable resolution. I have changed some of the control flow in forward and I have also modified the constructor of ContextGuidedBlock slightly to fix these problems. This will be useful for those who want to compile their model using TensoRT for embedded devices.
In it's current state, you cannot convert CGNet to torchscript using
torch.jit.script.
This is due to how torchscript handles variable resolution. I have changed some of the control flow inforward
and I have also modified the constructor ofContextGuidedBlock
slightly to fix these problems. This will be useful for those who want to compile their model using TensoRT for embedded devices.