Thank you I have got the following code working for my model. Can you help me in getting the accuracy for the model after every epoch. I am getting tensors as a result. How to compare and get the results. I am using 1792 input images corresponding to labels.
for i in range(EPOCHS):
  for batch_num in range(total_batch_num):
      inputs=np.reshape(x_train[batch_num,:,:,:,:], [1,CHANNELS,BATCH_SIZE,IMAGE_HEIGHT,IMAGE_WIDTH])
      Target = np.reshape(y_train[batch_num,:],[1,BATCH_SIZE])
      inputs = torch.from_numpy(inputs).float()
      Target = torch.from_numpy(Target).float()
      rPPG, x_visual, x_visual3232, x_visual1616 = model(inputs)
      rPPG = (rPPG-torch.mean(rPPG)) /torch.std(rPPG)	 	# normalize   
      Target = (Target-torch.mean(Target)) /torch.std(Target)    
      loss = criterion(rPPG,Target)     
      loss = loss.detach().numpy()
      print('Training: loss=' + str(loss))
      torch.save(model, 'save.model')
      print('A model has been saved')

where predicted value is rPPG and true value is Target