Hi,
I am reading the images using opencv. I have created a list of list that contains the data in the format ((image1, point1), (image2,point2),…). The image data is normalized to [-1,1]. The pixel point is set as floating point. I have saved this as numpy file (.npy). When training the network, I read the numpy file, then pass it to dataloader function and then read the data for training. As I am reading custom dataset, I have to typecast the data as a torch variable and float. Below I have the code for reading the data and training the network. Please let me know if that is correct.
training_data = np.load(“training_data.npy”)

# numpy reads it as array, convert to list for compatibility with dataloader

# training data format is a list of list with the image and the point

training_data = training_data.tolist()

trainloader = torch.utils.data.DataLoader(training_data, batch_size=64, shuffle=True)

net.train()
batch_loss = 0.0
for i, data in enumerate(trainloader):
	inputs, labels = data

	inputs, labels = Variable(inputs).float(), Variable(labels).float()
	inputs = inputs.cuda()
	labels = labels.cuda()

	optimizer.zero_grad()

	outputs = net(inputs)

	loss = criterion(outputs, labels)
	loss.backward()
	optimizer.step()

	batch_loss += loss.cpu().data.numpy()

The model does not learn anything when I swap axis. The previously trained model doesnt work either. And yes, reverting to the older version does not help in training as well.
I find it strange that a model that was learning and predicting very accurately, now is suddenIy predicting random points in a central region of the image. I understand that pytorch converts the python code to C++ internally for faster computations. Could it be that some package related to that has been updated? If so, what are the relevant packages?