nn.BCEWithLogitLoss  was added in master branch(0.2.0), so you can’t use it in stable version(0.1.12_2).
Since BCEWithLogitLoss just combines Sigmoid layer and the BCELoss in one single class,
you can add one sigmoid layer before BCELoss Instead.