Closed 10dutel closed 3 months ago
Hi, If you use a batchsize and datasetsize, that could lead to a single image remaining at the end of the epoch, this error will occur. Change image = image_batch[1, 0:1, :, :] to image = image_batch[0, 0:1, :, :] and it should be solved. Same for image = image_batch[1, 0:1, :, :] change to image = image_batch[1, :, :, :] Best
When training synapse data in 2D, processing 12% and then error:
Traceback (most recent call last): File "train_MaxViT_deform_LKA.py", line 134, in
trainer[dataset_name](args, net, args.output_dir)
File "/home/sjh/mydisk/project/deformableLKA/2D/trainer_MaxViT_deform_LKA.py", line 168, in trainer_synapse
image = image_batch[1, 0:1, :, :]
IndexError: index 1 is out of bounds for dimension 0 with size 1
Who can handle this problem?