Skip to content

Commit

Permalink
test: Added dedicated unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Aug 1, 2022
1 parent 8a92588 commit 4a0f35f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_methods_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from torchvision.models import resnet18
from torchvision.models import resnet18, mobilenet_v3_large

from torchcam.methods import _utils

Expand All @@ -8,6 +8,10 @@ def test_locate_candidate_layer(mock_img_model):
mod = resnet18().eval()
assert _utils.locate_candidate_layer(mod) == "layer4"

# Mobilenet V3 Large
mod = mobilenet_v3_large().eval()
assert _utils.locate_candidate_layer(mod) == "features"

# Custom model
mod = mock_img_model.train()

Expand Down

0 comments on commit 4a0f35f

Please sign in to comment.