Skip to content

Commit

Permalink
apply device to validators (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
noamzbr committed Apr 7, 2022
1 parent 00aa059 commit 6793e13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepchecks/vision/utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from deepchecks.core.errors import ValidationError
from deepchecks.utils.ipython import is_headless, is_notebook
from deepchecks.utils.strings import create_new_file_name
from deepchecks.vision.batch_wrapper import apply_to_tensor
from deepchecks.vision.vision_data import TaskType
from deepchecks.vision.utils.image_functions import numpy_to_image_figure, label_bbox_add_to_figure
from deepchecks.vision.vision_data import VisionData
Expand Down Expand Up @@ -71,7 +72,7 @@ def validate_extractors(dataset: VisionData, model, device=None, image_save_loca
if the value is True.
"""
print('Deepchecks will try to validate the extractors given...')
batch = next(iter(dataset.data_loader))
batch = apply_to_tensor(next(iter(dataset.data_loader)), lambda it: it.to(device))
images = None
labels = None
predictions = None
Expand Down

0 comments on commit 6793e13

Please sign in to comment.