# Target and output shape/type for binary classification using PyTorch

so I have some annotated images that I want to use to train a binary image classifier but I have been having issues creating the dataset and actually getting a test model to train. Each image is either of a certain class or not so I want to set up a binary classification dataset/model using PyTorch. I had some questions:

1. should labels be float or long?

2. what shape should my labels be?

3. I am using a resnet18 class from torchvision model, should my final softmax layer have one or two outputs?

4. what shapes should my target be, during training, if my batch size is 200?

5. what shape should my outputs be?

1. Labels should be long and advised.
2. [num_samples, ]
4. If your batch_size=200 then target somehow similar to this: [0, 1, 0, 1, 1, 0, ....1]