View source on GitHub |
Converts tf.int64 features to tf.int32, keep other features the same.
tfm.nlp.serving_modules.features_to_int32(
features: Dict[str, tf.Tensor]
) -> Dict[str, tf.Tensor]
tf.Example only supports tf.int64, but the TPU only supports tf.int32.
Args | |
---|---|
features
|
Input tensor dictionary. |
Returns | |
---|---|
Features with tf.int64 converted to tf.int32. |