tsai
tsai copied to clipboard
Can not use TSTPLUS with MVP
Unlabeled 100%
print("Unlabeled 100%") dsid = "transformer" learn = ts_learner(udls100, TSTPlus, cbs=[MVP(target_dir='./data/MVP', fname=f'{dsid}_200')]) learn.fit_one_cycle(40,1e-2) learn.plot_metrics() learn.MVP.show_preds(sharey=True) learn.feature_importance()
Traceback (most recent call last):
File "H:\20221125\tasi\tsbert.py", line 106, in {self.__class__.__name__} when calling event {event_name}:\n\t{e.args[0]}', replace=True)
File "F:\ProgramData\Anaconda3\envs\pytorchjy\lib\site-packages\fastai\callback\core.py", line 60, in call
try: res = getcallable(self, event_name)()
File "F:\ProgramData\Anaconda3\envs\pytorchjy\lib\site-packages\tsai\callback\MVP.py", line 183, in before_fit
assert xb.shape == self.learn.model(xb).shape, 'the model cannot reproduce the input shape'
AssertionError: Exception occured in MVP when calling event before_fit:
the model cannot reproduce the input shape
HELP!!!!!
udls100 = get_ts_dls(X, splits=splits, tfms=tfms, batch_tfms=batch_tfms) # used in pretraining
X.shape:(66, 4, 1800)
I have no idea what's wrong TT I just replace the inceptiontimeplus in the TSBERT example.