In the EnforcePos above, I changed the line weight.data = self._pos(weight).data) to:
with torch.no_grad():
    weight.copy_(self._pos(weight))

Next I made a simple network as follows:
class NormCNN(nn.Module):
    def __init__(self):
        super().__init__()
        self.nconv1 = NConv2d(1, 2, (5, 5), pos_fn='softplus', padding=2)
        self.nconv2 = Nconv2d(2, 2, (5, 5), pos_fn='softplus', padding=2)

    def forward(self, x, c):
        xout, cout = self.nconv1(x, c)
        xout, cout = self.nconv2(xout, cout)
        return xout, cout

The testing code is given by:
model = NormCNN()
model = torch.DataParallel(model)
model = model.cuda()

x = torch.rand(4, 1, 480, 752).cuda()
c = (x > 0.5).float().cuda()
xo, co = model(x, c)

And then, I got the error as above!