Thanks a lot Peter for your reply. You are absolutely right, that totally makes sense and is very strange. Ok so lets just stick to the CNN. Why am I getting the output batch size of 512?. When I explicitly stated the batch size to be 1. When I change this batchsize to 2 it becomes 1024.