zh320 / realtime-semantic-segmentation-pytorch

PyTorch implementation of over 30 realtime semantic segmentations models, e.g. BiSeNetv1, BiSeNetv2, CGNet, ContextNet, DABNet, DDRNet, EDANet, ENet, ERFNet, ESPNet, ESPNetv2, FastSCNN, ICNet, LEDNet, LinkNet, PP-LiteSeg, SegNet, ShelfNet, STDC, SwiftNet, and support knowledge distillation, distributed training etc.
Apache License 2.0
107 stars 19 forks source link

Call eval on model before inference #3

Closed TimSC closed 6 months ago

TimSC commented 6 months ago

When running in is_testing = True mode, the model needs eval() to be called before performing inference. Not doing this causes a loss in performance. There might be a better way to do this but this is the best I could find.

TimSC commented 6 months ago

Did you want this PR merged? Or is there a problem that needs addressing?