awesome-semantic-segmentation-pytorch
awesome-semantic-segmentation-pytorch copied to clipboard
Made CGNet scriptable
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.
This change is backwards compatible with existing cgnet weights.