AttributeError: module 'torch.nn' has no attribute 'BCEloss'

It seems the l is lowercase in your example. Try nn.BCELoss with an uppercase L.