Issue
When I download models through Torch Hub, models are automatically downloaded in /home/me/.cache/torch
.
How can I modify this behavior ?
Solution
From official documentation, there is several ways to modify this path.
In priority order :
Calling hub.set_dir()
$TORCH_HOME/hub, if environment variable TORCH_HOME is set.
$XDG_CACHE_HOME/torch/hub, if environment variable XDG_CACHE_HOME is set.
~/.cache/torch/hub
So I just had to do :
export TORCH_HUB=/my/path/
Edit
TORCH_HUB
appear to be deprecated, use TORCH_HOME
instead
Answered By - Astariul
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.