Keytoyze / VisionTS

Code for our paper "VisionTS: Visual Masked Autoencoders Are Free-Lunch Zero-Shot Time Series Forecasters".
https://arxiv.org/pdf/2408.17253
MIT License
172 stars 13 forks source link

How to load the checkpoint from local dir? #3

Closed FrankHo-Hwc closed 1 month ago

FrankHo-Hwc commented 1 month ago

Hi, authors: This paper is a great work and it enlighten me a lot. I meet some problems for reproducing the results. The server I use is unable to connect online that I have to download the checkpoints before evaluation. So is there a way to load the checkpoint from local dir? Thanks!

FrankHo-Hwc commented 1 month ago

Oh, I know how to load it. I'll close this issue.

Keytoyze commented 1 month ago

Hi: You can download mae_visualize_vit_base.pth from https://dl.fbaipublicfiles.com/mae/visualize/mae_visualize_vit_base.pth and save it to some folder such as ~/ckpt/ (i.e., in the path ~/ckpt/mae_visualize_vit_base.pth). After that, please pass the folder (i.e., ~/ckpt/) as the constructor argument ckpt_dir of VisionTS. You can refer to https://github.com/Keytoyze/VisionTS/blob/main/long_term_tsf/models/VisionTS.py#L20 or https://github.com/Keytoyze/VisionTS/blob/main/eval_gluonts/run.py#L107 to see how to specify the ckpt_dir argument.