Update run.py
Browse files
run.py
CHANGED
@@ -42,7 +42,7 @@ def flip_periodically(im, interval_s=2):
|
|
42 |
The flipped image.
|
43 |
"""
|
44 |
counter.step()
|
45 |
-
if (counter.imout.sum() == 0) or ((counter.n %
|
46 |
pixel_values = image_processor(im, return_tensors="pt").pixel_values.to(device)
|
47 |
outputs = model(pixel_values=pixel_values)
|
48 |
logits = outputs.logits.cpu().detach().numpy() ** 2
|
|
|
42 |
The flipped image.
|
43 |
"""
|
44 |
counter.step()
|
45 |
+
if (counter.imout.sum() == 0) or ((counter.n % 2) == 0):
|
46 |
pixel_values = image_processor(im, return_tensors="pt").pixel_values.to(device)
|
47 |
outputs = model(pixel_values=pixel_values)
|
48 |
logits = outputs.logits.cpu().detach().numpy() ** 2
|