The type mismatch error is most likely created if you are passing DoubleTensors as input data to the model. Numpy uses float64 as the default dtype and since you are using sklearn to create the dataset, I guess you would need to transform the tensors to FloatTensors via batch_x = batch_x.float() before passing it to the model (same for batch_y).
nn.BCEWithLogitssLoss expects logits so you should remove the F.log_softmax activation.