Your first convolution has in_channels=1,
so the tensor given to the model should be of shape [batch_size, 1, height, width].
It seems that it receives instead a tensor of shape [1, height, width].
If the 1 already represents your batch_size=1, then you need to add another channel dimension before the height (so at position 1):
outputs = net(distfunc.unsqueeze(dim=1))