Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,6 @@ def __new__(

if pretrained:
cache_dir = Path.home() / ".cache" / "torch" / "hub" / "checkpoints"
download_model(net=model, model_name=f"{model_name}", local_model_store_dir_path=str(cache_dir))
download_model(net=model, model_name=f"{model_name}c", local_model_store_dir_path=str(cache_dir))
print(f"Download model weight in {cache_dir!s}")
return model
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class TestOTXEfficientNet:
"efficientnet_b8",
],
)
def test_forward(self, model_name):
model = EfficientNetBackbone(model_name, pretrained=None)
@pytest.mark.parametrize("pretrained", [True, False])
def test_forward(self, model_name, pretrained):
model = EfficientNetBackbone(model_name, pretrained=pretrained)
assert model(torch.randn(1, 3, 244, 244))[0].shape[-1] == 8
assert model(torch.randn(1, 3, 244, 244))[0].shape[-2] == 8

Expand Down
Loading