Answers for "float tensor to uint8"

2

tf.cast

Casts a tensor to a new type.

tf.cast(
    x, dtype, name=None
)

The operation casts x (in case of Tensor) or x.values 
(in case of SparseTensor or IndexedSlices) to dtype.
Posted by: Guest on April-15-2020
0

Cast image to float32

tf.cast(x=image, dtype=tf.float32)
Posted by: Guest on November-21-2020

Browse Popular Code Answers by Language