The nn.Sigmoid takes only 1 params, but you give 2. https://pytorch.org/docs/stable/torch.html?highlight=sigmoid#torch.sigmoid 245
I guess you actually are looking for this https://pytorch.org/docs/stable/nn.html?highlight=cross_entropy#torch.nn.functional.binary_cross_entropy 393