Hi,
I am using mean square error ( nn.MSELoss() ). Optimizer is Adam ( optim.Adam(net.parameters(), lr=1e-4,weight_decay=1e-2) ).
Please find the code below about the data shape. Unfortunately I cannot post the images due to privacy and security concerns. But I did read the torch image (inputs) and then convert to numpy using these commands (inputs.numpy(); inputs.transpose(1,2,0)) . I saved the image using opencv and plotted the corresponding labels. It is correct.
training_data = np.load("training_data.npy")

print "data shape:", training_data.shape

a,b = training_data[0]
print "image shape:", a.shape
print "label:", b
print "label shape:", b.shape

training_data = training_data.tolist()
print "length of training data:", len(training_data)
a,b = training_data[0]
print "image data:", a.shape
print "label:",b




for i, data in enumerate(trainloader):
    # get the inputs
    inputs, labels = data

    print "torch image:", inputs.shape
    print "torch labels shape:", labels.shape
    print "torch labels", labels

data shape: (5000,2)
image shape: (3,68,240)
label: [206.8865,  10.2172]
length of training data: 5000
image data: (3,68,240)
label: [206.8865,  10.2172]
torch image: (8,3,68,240)    (when I run this on ipython it shows as torch array:   torch.Size([8, 3, 68, 240])  )
torch labels shape:  (8, 2)    (shows as torch.Size([8,2])  on ipython )
torch labels:
tensor([[206.8865,  10.2172],
[ 30.5665,  49.0771],
[191.4570,  14.4499],
[171.6556,  30.7590],
[157.3364,  20.8971],
[ 75.7549,  13.3485],
[ 68.8032,  17.6255],
[107.8486,  23.5131]], dtype=torch.float64)