LeiCheng-no / CDIL-CNN

31 stars 5 forks source link

Best way to test individual examples? #3

Open BassOnToast opened 2 years ago

BassOnToast commented 2 years ago

Hi, been looking through your codebase for a method for inputting just 1 example from a time series dataset (eg. FruitFlies) and having the CDIL-CNN spit out a prediction (and ideally confidence level) for it using one of the saved .ph models.

The only use of .load_state_dict to load a .ph file that I could find was in time_dynamic_main.py, I assume therefore that this functionality has not yet been added for non-dynamic nns?

LeiCheng-no commented 2 years ago

Hi. Sorry we do not include trained models so far. You could train a model from scratch using our codes. Dynamic (https://link.springer.com/chapter/10.1007/978-3-030-88113-9_24) CNN for time series need to pre-train a 'usual' convolution first, so loading a ph file here is not for testing but for training dynamic time warping.

BassOnToast commented 2 years ago

Ah, I already trained a model and have it saved as a .ph (I assume generated .ph files are saved models?); I am just looking for whether you have an established way of testing an individual example using a generated model.

LeiCheng-no commented 2 years ago

Sorry we do not split training with validation/testing. But it's easy to rewrite xxx_train.py--drop the training part and load the ph file (yes, it's the saved model) for testing.