.fuse() after .eval()
This commit is contained in:
parent
d04738a27c
commit
968b2ec004
|
@ -34,12 +34,12 @@ def detect(save_img=False):
|
|||
modelc.load_state_dict(torch.load('weights/resnet101.pt', map_location=device)['model']) # load weights
|
||||
modelc.to(device).eval()
|
||||
|
||||
# Fuse Conv2d + BatchNorm2d layers
|
||||
# model.fuse()
|
||||
|
||||
# Eval mode
|
||||
model.to(device).eval()
|
||||
|
||||
# Fuse Conv2d + BatchNorm2d layers
|
||||
# model.fuse()
|
||||
|
||||
# Export mode
|
||||
if ONNX_EXPORT:
|
||||
model.fuse()
|
||||
|
|
Loading…
Reference in New Issue