BravoLu / OpenVehicleReID

strong Vehicle Re-ID baseline framework.
62 stars 10 forks source link

too many values to unpack (expected 4) #4

Open vounteer opened 4 years ago

vounteer commented 4 years ago

When I run demo_ wild.sh An error occurred /home/eini/anaconda3/lib/python3.7/site-packages/torch/optim/lr_scheduler.py:82: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate "https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning) Traceback (most recent call last): File "main.py", line 80, in train(args, configs) File "main.py", line 46, in train trainer.train() File "/home/eini/WZY/open-VehicleReID-master/trainers/base.py", line 72, in train for i,inputs in enumerate(self.train_loader): File "/home/eini/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 346, in next data = self.dataset_fetcher.fetch(index) # may raise StopIteration File "/home/eini/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/eini/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batchedindex] File "/home/eini/WZY/open-VehicleReID-master/dataset/preprocessor.py", line 33, in getitem imgpath, id, cam, fname = self.dataset[index] ValueError: too many values to unpack (expected 4)

BravoLu commented 4 years ago

You can check the of number of the items of self.dataset