Closed Halleyawoo closed 4 years ago
I have made my png from the MRI files. There is a .py file called 2d from 3d in the repo. Have a look at it.
okay, thanks for your reply!
please don't close it now, maybe I 'll have some problems lately. lol thank you!
Sure. No problem. You can even write to me on malav.b93@gmail.com.
Hello! I met a problem which says:
RuntimeError: output with shape [1, 96, 96] doesn't match the broadcast shape [3, 96, 96]
I referred to online tutorials, change the sentence : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])
into another sentence : transform = transforms.Compose([ transforms.ToTensor(), transforms.Lambda(lambda x: x.repeat(3,1,1)), transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)) ])
But it is still the same error. Could you tell me why? Thx very much!
Its probably because you are providing a 1D input to the expected 3D tensor. try : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5], std=[0.5])])
But what is your input to the transformation?
What is the shape of the input given to datasets? Can you share those details?
and the shape of the output of the 2d_from_3d file that you are creating?
Its probably because you are providing a 1D input to the expected 3D tensor. try : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5], std=[0.5])])
But what is your input to the transformation?
i have tried this solution but didn't solve the problem.And my input data is RGB and mask is gray.
HI! very nice work!
I have no idea of this dataset. The link is as follows:
https://ida.loni.usc.edu/pages/access/search.jsp?tab=collection&loginKey=1568321853435385522&userEmail=949774840%40qq.com&project=ADNI&page=DOWNLOADS&subPage=IMAGE_COLLECTIONS
It just have .nii projects, I can not find .png which you are using in the test_image and test_label. Could you please give me a very specific link? I'll very appreciate about it!