tf.raw_ops.ToBool

Converts a tensor to a scalar predicate.

Converts a tensor to a scalar predicate with the following rules:

This matches the behavior of If and While for determining if a tensor counts as true/false for a branch condition.

input A Tensor. name A name for the operation (optional).

A Tensor of type bool.