cha15yq / CUT

Segmentation assisted U-shaped multi-scale transformer for crowd counting
17 stars 2 forks source link

data help #4

Closed YZGod666 closed 11 months ago

YZGod666 commented 11 months ago

10-11 11:05:50, content:code_test 10-11 11:05:50, seed:15 10-11 11:05:50, crop_size:512 10-11 11:05:50, downsample_ratio:8 10-11 11:05:50, data_dir:./data/part_A 10-11 11:05:50, save_dir:history 10-11 11:05:50, pretrained:pretrained/pcpvt_large.pth 10-11 11:05:50, drop:0.0 10-11 11:05:50, drop_path:0.45 10-11 11:05:50, max_num:1 10-11 11:05:50, device:0 10-11 11:05:50, resume: 10-11 11:05:50, batch_size:8 10-11 11:05:50, num_workers:0 10-11 11:05:50, gamma:2 10-11 11:05:50, opt:adamw 10-11 11:05:50, opt_eps:1e-08 10-11 11:05:50, opt_betas:None 10-11 11:05:50, momentum:0.9 10-11 11:05:50, weight_decay:0.0001 10-11 11:05:50, lr:0.0001 10-11 11:05:50, start_epoch:0 10-11 11:05:50, epochs:1000 10-11 11:05:50, start_val:200 10-11 11:05:50, val_epoch:1 10-11 11:05:50, Using 1 gpus Pre-trained model loaded! 10-11 11:05:51, ----------------------------------------Epoch:0/999---------------------------------------- Traceback (most recent call last): File "C:/Users/82776/Desktop/Segmentation assisted u-shaped multi-scale transformer for crowd counting/CUT-main/train.py", line 75, in trainer.train() File "C:\Users\82776\Desktop\Segmentation assisted u-shaped multi-scale transformer for crowd counting\CUT-main\utils\regression_trainer.py", line 88, in train self.train_epoch() File "C:\Users\82776\Desktop\Segmentation assisted u-shaped multi-scale transformer for crowd counting\CUT-main\utils\regression_trainer.py", line 111, in train_epoch self.dataloaders['train']): File "D:\app\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next data = self._next_data() File "D:\app\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 721, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\app\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\app\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\Users\82776\Desktop\Segmentation assisted u-shaped multi-scale transformer for crowd counting\CUT-main\dataset\dataset.py", line 51, in getitem return self.train_transform(img, den_map) File "C:\Users\82776\Desktop\Segmentation assisted u-shaped multi-scale transformer for crowd counting\CUT-main\dataset\dataset.py", line 75, in train_transform d_map = d_map.reshape([down_h, self.d_ratio, down_w, self.d_ratio]).sum(axis=(1, 3)) ValueError: cannot reshape array of size 245760 into shape (64,8,64,8)