chickenbestlover / RNN-Time-series-Anomaly-Detection

RNN based Time-series Anomaly detector model implemented in Pytorch.
Apache License 2.0
1.17k stars 316 forks source link

TypeError: invalid file: WindowsPath('save/ecg/checkpoint/chfdb_chf13_45590.pth') #6

Open yunzhonghe2017 opened 5 years ago

yunzhonghe2017 commented 5 years ago

=> saving checkpoint .. Traceback (most recent call last): File "train_predictor.py", line 338, in model.save_checkpoint(model_dictionary, is_best) File "C:\Users\Dell\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.5\model\model.py", line 103, in save_checkpoint torch.save(state, checkpoint) File "C:\Users\Dell\AppData\Roaming\Python\Python35\site-packages\torch\serialization.py", line 209, in save return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol)) File "C:\Users\Dell\AppData\Roaming\Python\Python35\site-packages\torch\serialization.py", line 132, in _with_file_like f = open(f, mode) TypeError: invalid file: WindowsPath('save/ecg/checkpoint/chfdb_chf13_45590.pth')

C:\Users\Dell\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.5>

chickenbestlover commented 5 years ago

The source code is tested on Ubuntu 16.04. You may have to change a few lines to run the source code on Windows.

yunzhonghe2017 commented 5 years ago

Ok. Thanks.

mangoocmt commented 5 years ago

@chickenbestlover What issues should be noted when to run the source code on Windows?

chickenbestlover commented 5 years ago

@yunzhonghe2017 Can you share the solution you found? Thank you!

yunzhonghe2017 commented 5 years ago

i changed the savedir in train_predictor.py and model.py as follow: default 1 @mangoocmt