Solved by syedmech47 in post #4 
              
              
                I think in code 1, you are concatenating 2 batches of Images, so if there is enough RAM, than it will work fine. 
In second code you are running model twice, so more time for same work. 
Here only thing to take care is whether you have the capacity to sent 256 Batch Size to model or not, if yes than…