You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a problem with the way ts_learner constructs a learn instance when used with xresnet. It gives the following error:
AttributeError:
'XResNet' object has no attribute 'backbone'
File "/root/tsai/tsai/tsai/models/utils.py", line 82, in ts_splitter
return L(m.backbone, m.head).map(params)
File "/root/test_py.py", line 16, in <module>
learn.fit_one_cycle(10, 1e-3)
Code
from tsai.all import *
dsid = 'NATOPS'
X_train, y_train, X_test, y_test = get_UCR_data(dsid, return_split=True)
X, y, splits = combine_split_data([X_train, X_test], [y_train, y_test])
print(X.shape)
print(y.shape)
tfms = [None, [Categorize()]]
dsets = TSDatasets(X, y, tfms=tfms, splits=splits, inplace=True)
dls = TSDataLoaders.from_dsets(dsets.train, dsets.valid, bs=[64, 128], batch_tfms=[TSStandardize()], num_workers=0)
# this works
#model = create_model(xresnet1d18, dls=dls)
#learn = Learner(dls, model)
# this doesn't work
learn = ts_learner(dls, xresnet1d18)
learn.fit_one_cycle(10, 1e-3)
I am using tsai 0.2.25.
The text was updated successfully, but these errors were encountered:
Hi @GitInTheRobot, thanks for reporting this issue. I've analyzed it and it was indeed a bug. I've now fixed it in GitHub.
It'd be great if you could retest it and confirm it works well using:
There's a problem with the way ts_learner constructs a learn instance when used with xresnet. It gives the following error:
AttributeError:
Code
I am using tsai 0.2.25.
The text was updated successfully, but these errors were encountered: