Skip to content

Commit 1a7777d

Browse files
Removed volatile for no_grad()
1 parent 2ce0134 commit 1a7777d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

video_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ def arg_parse():
135135
im_dim = im_dim.cuda()
136136
img = img.cuda()
137137

138-
139-
output = model(Variable(img, volatile = True), CUDA)
138+
with torch.no_grad():
139+
output = model(Variable(img), CUDA)
140140
output = write_results(output, confidence, num_classes, nms = True, nms_conf = nms_thesh)
141141

142142
if type(output) == int:

0 commit comments

Comments
 (0)