We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e86db2d commit 0d6b2d5Copy full SHA for 0d6b2d5
dlclive/benchmark_pytorch.py
@@ -3,6 +3,7 @@
3
import subprocess
4
import sys
5
import time
6
+import warnings
7
8
import colorcet as cc
9
import cv2
@@ -218,6 +219,12 @@ def benchmark(
218
219
for i in iterator:
220
ret, frame = cap.read()
221
if not ret:
222
+ warnings.warn(
223
+ (
224
+ "Did not complete {:d} frames. "
225
+ "There probably were not enough frames in the video {}."
226
+ ).format(n_frames, video_path)
227
+ )
228
break
229
230
start_time = time.perf_counter()
0 commit comments