Returns the truth value of x AND y element-wise.
tf.raw_ops.LogicalAnd(
x, y, name=None
)
Logical AND function.
Requires that x
and y
have the same shape or have
broadcast-compatible
shapes. For example, x
and y
can be:
- Two single elements of type
bool
. - One
tf.Tensor
of typebool
and one singlebool
, where the result will be calculated by applying logical AND with the single element to each element in the larger Tensor. - Two
tf.Tensor
objects of typebool
of the same shape. In this case, the result will be the element-wise logical AND of the two input tensors.
You can also use the &
operator instead.
Usage | |
---|---|
This op also supports broadcasting
|
The reduction version of this elementwise operation is tf.math.reduce_all
.
Args | |
---|---|
x
|
A tf.Tensor of type bool.
|
y
|
A tf.Tensor of type bool.
|
name
|
A name for the operation (optional). |
Returns | |
---|---|
A tf.Tensor of type bool with the shape that x and y broadcast to.
|
Args | |
---|---|
x
|
A Tensor of type bool .
|
y
|
A Tensor of type bool .
|
name
|
A name for the operation (optional). |
Returns | |
---|---|
A Tensor of type bool .
|