Are you using 3 GPUs for nn.DataParallel?
Could you print the shape of x in your forward method at these lines of code:
elif self.num_cuda_devices > 1:
    print(x.size())
    x = self.input_layer(x.float()).cuda()  
    x = torch.sigmoid(x)
    print(x.size())
    x = self.hidden_1(x).cuda()