Skip to content
Closed
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
2 changes: 1 addition & 1 deletion docs/source/hub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can see the full script in
- ``args`` and ``kwargs`` are passed along to the real callable function.
- Docstring of the function works as a help message. It explains what does the model do and what
are the allowed positional/keyword arguments. It's highly recommended to add a few examples here.
- Entrypoint function should **ALWAYS** return a model(nn.module).
- Entrypoint function can either return a model(nn.module), or auxiliary tools to make the user workflow smoother, e.g. tokenizers.
- Pretrained weights can either be stored locally in the github repo, or loadable by
``torch.hub.load_state_dict_from_url()``. In the example above ``torchvision.models.resnet.resnet18``
handles ``pretrained``, alternatively you can put the following logic in the entrypoint definition.
Expand Down