Chiaraplizz / ST-TR

Spatial Temporal Transformer Network for Skeleton-Based Activity Recognition
MIT License
299 stars 58 forks source link

Save '???.pt' error: No such file or directory #2

Closed wangwwwwwwv closed 3 years ago

wangwwwwwwv commented 3 years ago

hi Chiaraplizz. I have got new bugs LOL i was running the main.py in my datasets. and i just run 5 epochs in order to have a try.

Validation: Epoch [4/5], Samples [25.0/465], Loss: 2.3637566566467285, Validation Accuracy: 5.376344086021505
[ Sun Nov 29 14:19:36 2020 ] Load weights from /home/lijianwei/st_tr_wsq/check_points/epoch4_model.pt.
Traceback (most recent call last):
  File "main.py", line 959, in <module>
    processor.start()
  File "main.py", line 890, in start
    weights = torch.load(
  File "/home/lijianwei/.pyenv/versions/TTNet/lib/python3.8/site-packages/torch/serialization.py", line 584, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/home/lijianwei/.pyenv/versions/TTNet/lib/python3.8/site-packages/torch/serialization.py", line 234, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/home/lijianwei/.pyenv/versions/TTNet/lib/python3.8/site-packages/torch/serialization.py", line 215, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/home/lijianwei/st_tr_wsq/check_points/epoch4_model.pt'

here is my check_points dir:

[sse-server st_tr_wsq]$ ls
conf_val_0.npy  conf_val_1.npy  conf_val_2.npy  conf_val_3.npy  conf_val_4.npy

 save_model = ((epoch + 1) % self.arg.save_interval == 0) or (
                        epoch + 1 == self.arg.num_epoch)
                print(save_model)
                eval_model = ((epoch + 1) % self.arg.eval_interval == 0) or (
                        epoch + 1 == self.arg.num_epoch)

                self.train(epoch, save_model=save_model)

i'm going to set the SAVE_MODE = True. Hoping that would solve the questions.

wangwwwwwwv commented 3 years ago

I just re-clone the projects and figur it out