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
Hi, everyone. Recently, when I used the E3DLSTM and SwinLSTM, some errors occurred. I hope someone can help me solve this problem. For E3DLSTM, the error is:
Traceback (most recent call last):
File "./pycharm-community-2022.2.2/plugins/python-ce/helpers/pydev/pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "./pycharm-community-2022.2.2/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "./E3D-LSTM_test.py", line 334, in <module>
exp = BaseExperiment(args, dataloaders=(dataloader_train, dataloader_val, dataloader_test), strategy='auto')
File "./Downloads/OpenSTL/openstl/api/exp.py", line 36, in __init__
self.method = method_maps[self.args.method](steps_per_epoch=len(self.data.train_loader), \
File "./OpenSTL/openstl/methods/e3dlstm.py", line 14, in __init__
PredRNN.__init__(self, **args)
File "./OpenSTL/openstl/methods/predrnn.py", line 17, in __init__
super().__init__(**args)
File "./OpenSTL/openstl/methods/base_method.py", line 22, in __init__
self.model = self._build_model(**args)
File "./Downloads/OpenSTL/openstl/methods/e3dlstm.py", line 17, in _build_model
num_hidden = [int(x) for x in self.args.num_hidden.split(',')]
File "./miniconda3/envs/OpenSTL/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1614, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'E3DLSTM' object has no attribute 'args'
HI,
I encountered the same issue with SwinLSTM, which requires an older timm version. To fix it, I downgraded timm to 0.6.11 and modified the imports in all files inside the OpenSTL folder:
Changed imports to ensure compatibility:
from timm.layers → from timm.models.layers
timm.models._efficientnet_blocks → timm.models.efficientnet_blocks
timm.models._resnet → timm.models.resnet
timm.models._helpers → timm.models.helpers
works for me (not official).
Not sure if this is the most elegant solution, but it resolves the issue for now.
Thank you for getting back to me! I checked the version of timm, it is 0.9.2. I remember initially having problems with incompatible timm versions when I tested if openstl was installed successfully.
If I need to use SwinLST later, I'll try the method you provided. Thanks again!
Hi, everyone. Recently, when I used the E3DLSTM and SwinLSTM, some errors occurred. I hope someone can help me solve this problem. For E3DLSTM, the error is:
The parameters used in E3DLSTM are as follows:
For SwinLSTM, the error is as follows:
and the parameters for SwinLSTM are as follows:
The training code for the model is as follows:
The version of OpenSTL is 1.0.0. May I ask how to solve the above error? Thank you for your help!
The text was updated successfully, but these errors were encountered: