During handling of the above exception, another exception occurred: Traceback (most…
- User
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/run_training.py", line 110, in main() File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/run_training.py", line 101, in main run_training(args.script, args.config, cudnn_benchmark=args.cudnn_benchmark, File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/run_training.py", line 72, in run_training expr_module = importlib.import_module('lib.train.train_script') File "/home/heyuting/anaconda3/envs/mamba/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/train/train_script.py", line 13, in from lib.models.mamba_fetrack import build_mamba_fetrack File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/models/init.py", line 1, in from .mamba_fetrack import build_mamba_fetrack File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/models/mamba_fetrack/init.py", line 1, in from .mamba_fetrack import build_mamba_fetrack File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/models/mamba_fetrack/mamba_fetrack.py", line 17, in from lib.models.mamba_fetrack.mamba_cross import CrossMamba File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/models/mamba_fetrack/mamba_cross.py", line 7, in from lib.models.mamba_fetrack.mamba_cross_simple import Mamba File "/data2/local_userdata/heyuting/Mamba/FETrack/Mamba_FETrack/lib/train/../../lib/models/mamba_fetrack/mamba_cross_simple.py", line 21, in selective_scan_fn, mamba_inner_fn, bimamba_inner_fn, mamba_inner_fn_no_out_proj = None, None, None, None, None ValueError: too many values to unpack (expected 4) 报错的原因
- Assistant
The error message you posted indicates that there is a problem in the file named
mamba_cross_simple.py. Specifically, the error occurs in the following line:selective_scan_fn, mamba_inner_fn, bimamba_inner_fn, mamba_inner_fn_no_out_proj = None, None, None, None, NoneThis line is trying to unpack five
Nonevalues into four variables, which is causing aValueErrorbecause the number of variables doesn't match the number of values. This is a common mistake when initializing multiple variables to the same value.To fix this error, you should either remove one of the variables or one of the
Nonevalues, depending on your needs. In Python, you only need to provide as many values as there are variables. Here's a corrected version of the line if all four variables need to be initialized toNone:selective_scan_fn, mamba_inner_fn, bimamba_inner_fn, mamba_inner_fn_no_out_proj = None, None, None, NoneMake sure that these variables are correctly used in your code. If you intended to declare five variables, you need to add an extra variable name in the assignment. Otherwise, the above correction should solve your problem. Check if your program has some logic that depends on a specific variable that might be missing or misnamed.