Skip to content

Commit 1e6c99a

Browse files
Ailing Zhangfacebook-github-bot
authored andcommitted
update hub doc (#21568)
Summary: update doc as pointed out in pytorch/hub#22 Pull Request resolved: #21568 Differential Revision: D15732927 Pulled By: ailzhang fbshipit-source-id: 78ab026539e5ee59e7c3a8144e2c9fcbbc225733
1 parent f308b07 commit 1e6c99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/hub.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can see the full script in
4747
- ``args`` and ``kwargs`` are passed along to the real callable function.
4848
- Docstring of the function works as a help message. It explains what does the model do and what
4949
are the allowed positional/keyword arguments. It's highly recommended to add a few examples here.
50-
- Entrypoint function should **ALWAYS** return a model(nn.module).
50+
- Entrypoint function can either return a model(nn.module), or auxiliary tools to make the user workflow smoother, e.g. tokenizers.
5151
- Pretrained weights can either be stored locally in the github repo, or loadable by
5252
``torch.hub.load_state_dict_from_url()``. In the example above ``torchvision.models.resnet.resnet18``
5353
handles ``pretrained``, alternatively you can put the following logic in the entrypoint definition.

0 commit comments

Comments
 (0)