zijundeng/pytorch-semantic-segmentation

RuntimeError: bool value of Tensor with more than one value is ambiguous

sakhawathsumit opened this issue · 0 comments

I was trying to use the file models/u_net.py with following lines of code. Got RuntimeError: bool value of Tensor with more than one value is ambiguous.

img = np.zeros((1, IMG_HEIGHT, IMG_WEIGHT, IMG_CHANNELS))
img = torch.from_numpy(img)
UNet(img)
error

Any idea how to solve this?