Your input had the shape [4, 1, 2], which I changed to [4, 2], since dim1 is not needed.
If you want to use nn.CrossEntropyLoss, your target should have the shape [4] containing the class indices as values. Also, the sigmoid should be removed as the last layer in your model.
Additionally, if you would like to just use two classes, your last linear layer should also output two values (out_features=2).