Hello, doing binary classification with BCELoss()
this is my dataset gettiem()

def getitem(self,index):
x=torch.tensor(self.df.iloc[index,:-1])
y_label=torch.tensor(self.df.iloc[index,-1])
return (x.float(),y_label.float())

this is my Model

class Credit_Module(nn.Module):
    def __init__(self):
        super().__init__()
#if i have 20 columns should i give first layer 20 input features?
        self.fc1=nn.Linear(20,50)
        self.fc2=nn.Linear(50,80)
        self.fc3=nn.Linear(80,20)
        self.fc4=nn.Linear(20,2)
        
    
    def forward(self,x):
        x=F.relu(self.fc1(x))
        x=F.relu(self.fc2(x))
        x=F.relu(self.fc3(x))
        x=self.fc4(x)
        print(x.shape)
        return x

This is The Error


                    y_pred=model(X_train)
     11             print(y_train.shape)
---> 12             loss=criterion(y_pred,y_train)
ValueError: Using a target size (torch.Size([10])) that is different to the input size (torch.Size([10, 2])) is deprecated. Please ensure they have the same size.



it gets different sizes. how can i make them same size?
Should i change a Loss function ? or something in my model?
Train loader batch size is 10