Traceback (most recent call last):

Traceback (most recent call last):
RuntimeError: sizes do not match at /b/wheel/pytorch-src/torch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:296

how to solve the bug

Could you provide a small code snippet reproducing the error?
Maybe it could be a size mismatch error.