arnab39 / FewShot_GAN-Unet3D

Tensorflow implementation of our paper: Few-shot 3D Multi-modal Medical Image Segmentation using Generative Adversarial Learning
MIT License
377 stars 82 forks source link

CUDA error: device-side assert triggered, The loss here is a tensor, and no value is returned. #23

Open tian-003 opened 2 years ago

tian-003 commented 2 years ago

CUDA error: device-side assert triggered

The iseg2017 data is used, and the data format is hdr. The loss here is a tensor, and no value is returned. How to solve this problem? run FewShot_GAN-Unet3D-master/pytorch/agents/supervised_baseline.py

self.criterion =nn.CrossEntropyLoss(class_weights) loss = self.criterion(output_logits, labels) loss.backward() self.optimizer.step()