Solved by simaiden in post #2 
              
              
                Use 
numpy_array = ... # your numpy array image with shape (224,224)
tensor = torch.from_numpy(numpy_array) #torch.Size([224, 224])
tensor = tensor.unsqueeze(dim=0) # torch.Size([1, 224, 224])