I just got an RTX 2070 Super and I'd like to try out half precision training using Keras with TensorFlow back end.
So far I have found articles like this one that suggest using this settings:
import keras.backend as K
dtype='float16'
K.set_floatx(dtype)
# default is 1e-7 which is too small for float16. Without adjusting the epsilon, we will get NaN predictions because of divide by zero problems
K.set_epsilon(1e-4)
The network is a simple 4 layer CNN for audio classification.
My input data is a NumPy 3D array generated previously (audio MFCC features extracted with LibROSA). This data was generated using the CPU and I understand that the values are saved as 32bit float.
When I try to train my net with this data I get the following error:
TypeError: Tensors in list passed to 'inputs' of 'Merge' Op have types [float16, float32] that don't all match.
On a different article I read that I should also "Cast back to FP32 before SoftMax layer", what makes things even more confussing...
I would really appreciate some orientation.
Thanks!