Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ Conference
## Description
What it does

## Use From Torch Hub
```python
import torch
model = torch.hub.load(
"pytorchlightning/deep-learning-project-template",
"lit_classifier",
)
```

## How to run
First, install dependencies
```bash
Expand Down
8 changes: 8 additions & 0 deletions hubconf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from project.lit_mnist import LitClassifier


# any function defined here will be able to load a model like:
# torch.hub.load("username/repo", "lit_classifier", *args, **kwargs)
# can put logic here for loading pretrained weights
def lit_classifier(*args, **kwargs):
return LitClassifier(*args, **kwargs)