Customized Deep Learning with Keras and TensorFlow Class