ypxie / HDGan

Pytorch implementation of HDGan
150 stars 36 forks source link

Test_coco.sh Problem #20

Open kukujoyyo opened 3 years ago

kukujoyyo commented 3 years ago

When I run Test_coco.sh file, I've got the problem of the concatenation axis, shown below, could you help me? Many Thanks!

saved files [sample 5936/40504]: {'output_64': 5936, 'output_128': 5936, 'output_256': 5936} saved files [sample 5944/40504]: {'output_64': 5944, 'output_128': 5944, 'output_256': 5944} saved files [sample 5952/40504]: {'output_64': 5952, 'output_128': 5952, 'output_256': 5952} saved files [sample 5960/40504]: {'output_64': 5960, 'output_128': 5960, 'output_256': 5960} saved files [sample 5968/40504]: {'output_64': 5968, 'output_128': 5968, 'output_256': 5968} saved files [sample 5976/40504]: {'output_64': 5976, 'output_128': 5976, 'output_256': 5976} saved files [sample 5984/40504]: {'output_64': 5984, 'output_128': 5984, 'output_256': 5984} saved files [sample 5992/40504]: {'output_64': 5992, 'output_128': 5992, 'output_256': 5992} Traceback (most recent call last): File "test_worker.py", line 71, in test_gans(dataset, model_root, model_name, save_folder, netG, args) File "....\HDGan\HDGan_test.py", line 80, in test_gans test_images, test_embeddings_list, test_captions, saveIDs, classIDs = test_sampler() File "....\HDGan\fuel\datasets_multithread.py", line 202, in next_batch_test sampled_images = self.images(sampled_filenames).astype(np.float32) File "....\HDGan\fuel\datasets_multithread.py", line 29, in img_loader_func res = np.concatenate(res, axis=0) File "<__array_function__ internals>", line 6, in concatenate ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 3, the array at index 0 has size 3 and the array at index 7 has size 500 test_coco.sh: line 9: 190 Segmentation fault CUDA_VISIBLE_DEVICES="0" python test_worker.py --dataset coco --model_name ${name} --load_from_epoch 200 --test_sample_num 1 --batch_size 8