From 37ceed6041567d8031b56d27d64010d5f3d32082 Mon Sep 17 00:00:00 2001 From: Modric Wang Date: Wed, 31 May 2023 01:51:36 +0800 Subject: [PATCH] Update test_latency.py fix import issue, use deploy state during speed test --- test_latency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_latency.py b/test_latency.py index f67c20a..e5c8d96 100644 --- a/test_latency.py +++ b/test_latency.py @@ -9,7 +9,7 @@ import torchvision import time -import models.vanillanet +from models.vanillanet import * if __name__ == "__main__": @@ -22,6 +22,7 @@ net = vanillanet_5().cuda() net.eval() + net.switch_to_deploy() print(net) for img, target in data_loader_val: img = img.cuda()