Solved by Nikronic in post #2 
              
              
                Hi, 
Error is happening here, which means imgs that you are stacking do not have same shape. Based on error, for some images, you have 64 and another 28 for height. 

Bests