I’m not sure what you’re trying to do.
I assume your error comes from a call to some criterion.
If you want to classify 40 features and you have 2604 samples, your input tensor should be of size (2604, 40).
For instance, the following code works:
criterion = nn.BCEWithLogitsLoss()

# 2604 1D vectors of length 40
dummy_input  = torch.randn(2604, 40)
# 2604 integers in [0, 1], casted to float.
dummy_target = torch.randint(2, (2604, 1)).float()  

model  = DiscriminatorNet()
output = model(dummy_input)

print(output.size())        # torch.Size([2604, 1])
print(dummy_target.size())  # torch.Size([2604, 1])

loss = criterion(dummy_target, output)
print(isinstance(loss.item(), float)) # True

I can only suggest you to identify which torch function actually causes the error you face and to check the relevent pytorch documentation.