oh it was completely careless of me , thanks ptrblck  .Although I’m feeding my model as CxHxW type, facing a problem now: Expected tensor to be a tensor image of size (C, H, W). Got tensor.size() = torch.Size([30]).
The values ​​I give as pictures and labels are as follows; torch.Size([7049, 1, 96, 96])
torch.Size([7049, 30]) and My model output is 30 feature
Stack trace ;
ValueError                                Traceback (most recent call last)
 in 
----> 1 X,Y = dataset[0].item
 in getitem(self, index)
25     def getitem(self,index):
26         X_transform = self.transform(self.X[index])
—> 27         Y_transform = self.transform(self.Y[index])
28         return self.X_transform,self.Y_transform
29
/opt/conda/lib/python3.7/site-packages/torchvision/transforms/transforms.py in call(self, img)
59     def call(self, img):
60         for t in self.transforms:
—> 61             img = t(img)
62         return img
63
/opt/conda/lib/python3.7/site-packages/torchvision/transforms/transforms.py in call(self, tensor)
164             Tensor: Normalized Tensor image.
165         “”"
–> 166         return F.normalize(tensor, self.mean, self.std, self.inplace)
167
168     def repr(self):
/opt/conda/lib/python3.7/site-packages/torchvision/transforms/functional.py in normalize(tensor, mean, std, inplace)
192     if tensor.ndimension() != 3:
193         raise ValueError('Expected tensor to be a tensor image of size (C, H, W). Got tensor.size() = ’
–> 194                          ‘{}.’.format(tensor.size()))
195
196     if not inplace:
ValueError: Expected tensor to be a tensor image of size (C, H, W). Got tensor.size() = torch.Size([30]).