From 17fdb285d69de0edf2b7310abe20fd948da73454 Mon Sep 17 00:00:00 2001 From: "devil.tamachan" Date: Thu, 29 Aug 2019 23:00:16 +0900 Subject: [PATCH] Reduce memory usage --- test_davis_videos.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_davis_videos.py b/test_davis_videos.py index e02db64..49a839f 100644 --- a/test_davis_videos.py +++ b/test_davis_videos.py @@ -50,4 +50,5 @@ print(i) stacked_img = data[0] targets = data[1] - model.run_and_save_DAVIS(stacked_img, targets, save_path) + with torch.no_grad(): + model.run_and_save_DAVIS(stacked_img, targets, save_path)