Why do i have to convert "uint8" into "float32"
Well the reason is simple, the whole math for neural networks is continuous, not discrete, and this is best approximated with floating point numbers. The inputs, outputs, and weights of a neural network are continuous numbers.
If you had integer outputs, they will still be converted to floating point at some point in the pipeline, in order to have compatible types where operations can be made. This might happen explicitly or implicitly, its better to be explicit about types.
In some frameworks you might get errors if you do not cast the inputs to the expected types.
I just started looking into deep learning and started to build a CNN with Keras. 
So I've noticed that oftentimes when the Dataset MNIST is used, after importing the images, they are getting converted to float32-Datatype. 
So my question is, why is that the case? It seems like it should work fine with uint8-Data. What am I missing here? Why is float32 needed?