Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: not enough values to unpack (expected 2, got 1) #1

Open
ssbilakeri opened this issue Oct 5, 2020 · 2 comments
Open

ValueError: not enough values to unpack (expected 2, got 1) #1

ssbilakeri opened this issue Oct 5, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ssbilakeri
Copy link

(base) D:\project_dir\HJLReID\MDRSREID>python demo.py --model_name MDRS --exp_dir /project_dir/weights_results/HJLReID1/MDRS_ADAM_random_erasing_margin_0.3_market_best --default_config_path /project_dir/HJLReID/MDRSREID/Settings/config/default_config.py --ow_config_path /project_dir/HJLReID/MDRSREID/Settings/config/overwrite_config/MDRS_config_ADAM_best_market1501.txt --ow_str cfg.dataset.train.name = 'market1501'
destination path dir /project_dir/weights_results/HJLReID1/MDRS_ADAM_random_erasing_margin_0.3_market_best has been already exist.
ow_config_path is: /project_dir/HJLReID/MDRSREID/Settings/config/overwrite_config/MDRS_config_ADAM_best_market1501.txt
ow_str is: cfg.dataset.train.name
Traceback (most recent call last):
File "demo.py", line 7, in
cfg = pre_initialization()
File "..\MDRSREID\Trainer\pre_initialization_init_.py", line 11, in pre_initialization
cfg = init_config()
File "..\MDRSREID\Trainer\pre_initialization\init_config.py", line 35, in init_config
overwrite_config_file(dst_config_path, ow_str=args.ow_str)
File "..\MDRSREID\utils\config_utils\overwrite_config_file.py", line 24, in overwrite_config_file
key, value = cfg.split('=')
ValueError: not enough values to unpack (expected 2, got 1)

Please help me to fix this error

@nickhuang1996 nickhuang1996 self-assigned this Oct 5, 2020
@nickhuang1996
Copy link
Owner

@ssbilakeri
If you use cmd or power shell, you need to add double quotation mark to the expression:
--ow_str "cfg.dataset.train.name = 'market1501'"
I recommend you to use Pycharm to build this project so that avoid this problem.

@ssbilakeri
Copy link
Author

Hi,
when I try to train with only baseline getting below error. can you please tell me the reason for it.
I have changed ow_config_path to baseline_config.tx

Traceback (most recent call last):
File "demo.py", line 11, in
trainer.train()
File "..\MDRSREID\Trainer\MDRSReIDTrainer.py", line 107, in train
pred = self.model.forward(item, cfg=self.cfg, forward_type='Supervised')
File "..\MDRSREID\Networks_init_.py", line 101, in forward
return self.model(in_dict, cfg, forward_type=forward_type)
File "C:\Users\ssbilakeri\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "..\MDRSREID\Networks\MDRS_init_.py", line 52, in forward
out_dict['multi_seg_pred_list'] = self.multi_seg_forward(in_dict)
File "..\MDRSREID\Networks\MDRS_init_.py", line 38, in multi_seg_forward
return self.multi_seg(in_dict)
File "C:\Users\ssbilakeri\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "..\MDRSREID\Networks\MDRS\MDRS_multi_seg.py", line 99, in forward
multi_seg_pred_list.append(self.conv(self.relu(self.bn(self.deconv2(self.deconv1(feat_list[i]))))))
IndexError: list index out of range

@nickhuang1996 nickhuang1996 added the bug Something isn't working label Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants