Skip to content

Commit

Permalink
remove device parameter in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Oberhofer committed Dec 18, 2023
1 parent e658038 commit aa45c73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/test_context_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def test_memory_usage_in_loop(numpy_image, batch_size, width, height,
initial_memory = 0
for i in range(100):
with cam_method(model=model,
target_layers=target_layers,
device=None) as cam:
target_layers=target_layers) as cam:
grayscale_cam = cam(input_tensor=input_tensor,
targets=targets,
aug_smooth=aug_smooth,
Expand Down
3 changes: 1 addition & 2 deletions tests/test_one_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def test_memory_usage_in_loop(numpy_image, cam_method):
print("input_tensor", input_tensor.shape)
targets = None
with cam_method(model=model,
target_layers=target_layers,
device=None) as cam:
target_layers=target_layers) as cam:
grayscale_cam = cam(input_tensor=input_tensor,
targets=targets)
print(grayscale_cam.shape)
3 changes: 1 addition & 2 deletions tests/test_run_all_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def test_all_cam_models_can_run(numpy_image, batch_size, width, height,
target_layers.append(eval(f"model.{layer}"))

cam = cam_method(model=model,
target_layers=target_layers,
device=None)
target_layers=target_layers)
cam.batch_size = 4
if target_category is None:
targets = None
Expand Down

0 comments on commit aa45c73

Please sign in to comment.