now i get
Traceback (most recent call last):
File “train_bu.py”, line 255, in 
train(i_epoch)
File “train_bu.py”, line 213, in train
loss = torch.nn.BCELoss(y, y_hat)  # crossentropy loss. If one class is too imbalanced,
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py”, line 495, in init
super(BCELoss, self).init(weight, size_average, reduce, reduction)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py”, line 19, in init
super(_WeightedLoss, self).init(size_average, reduce, reduction)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py”, line 12, in init
self.reduction = _Reduction.legacy_get_string(size_average, reduce)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/_reduction.py”, line 36, in legacy_get_string
if size_average and reduce:
RuntimeError: bool value of Tensor with more than one value is ambiguous