Hi Zhiyuan!



 zyc:

Initially I was using BCEWithLogitsLoss but as the dataset set is quite imbalanced, it soon predicts all 0.


Consider using  BCEWithLogitsLoss with its pos_weight (or possibly
its weight) constructor-argument to account for the data imbalance.
Best.
K. Frank