awesome-semantic-segmentation-pytorch icon indicating copy to clipboard operation
awesome-semantic-segmentation-pytorch copied to clipboard

Made CGNet scriptable

Open nassir90 opened this issue 2 years ago • 1 comments

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.

nassir90 avatar Jun 12 '22 14:06 nassir90

This change is backwards compatible with existing cgnet weights.

nassir90 avatar Jun 12 '22 14:06 nassir90