Solved by IliasPap in post #4 
              
              
                Check the shape of your image after the  transformations , maybe the output size is not 224x224 and there is a problem with view( )