Your input shape is [batch_size=16, 1], which is wrong for a 2-class classification.
nn.CrossEntropyLoss expects the model output to have the shape [batch_size, nb_classes] for a multi-class classification, so in your case this would be [batch_size, 2].
If you want to use a single output neuron for the binary classification, you could use nn.BCEWithLogitsLoss instead (and would need to unsqueeze dim1 in your target).