tf.strings.to_number

View source on GitHub

Converts each string in the input Tensor to the specified numeric type.

tf.strings.to_number(
    input, out_type=tf.dtypes.float32, name=None
)

(Note that int32 overflow results in an error while float overflow results in a rounded value.)

Args:

Returns:

A Tensor of type out_type.