TensorFlow Lite converter
https://www.tensorflow.org/lite/convert?hl=nbIf you have checkpoints, then first convert it to a Frozen GraphDef file and then use this API as shown here. Note: The following sections assume you've both installed TensorFlow 2.x and trained models in TensorFlow 2.x. Convert a SavedModel (recommended) The following example shows how to convert a SavedModel into a TensorFlow Lite model.
tf.cast | TensorFlow Core v2.7.0
https://www.tensorflow.org/api_docs/python/tf/castA Tensor or SparseTensor or IndexedSlices of numeric type. It could be uint8, uint16, uint32, uint64, int8, int16, int32 , int64, float16, float32, float64, complex64, complex128 , bfloat16 . The destination type. The list of supported dtypes is the same as x . A name for the operation (optional).