I am using the keras mixed precision API in order to fit my networks in GPU. Typically in my code this will look like this. A MWE would be: