Function to pad image dim.
First approach to neural network training