Python | Tensorflow logical_or() method
Tensorflow is an open-source machine learning library developed by Google. One of its applications is to develop deep neural networks.
tensorflow.math provides support for many basic mathematical operations. Function
tf.math.logical_or] provides support for the logical OR function in Tensorflow. It expects the input of bool type. The input types are tensor and if the tensors contains more than one element, an element-wise logical OR is computed, .
Syntax: tf.logical_or(x, y, name=None) or tf.math.logical_or(x, y, name=None)
x: A Tensor of type bool.
y: A Tensor of type bool.
name (optional): The name for the operation.
Return type: A Tensor of bool type with the same size as that of x or y.
Input type: Tensor("Const:0", shape=(4, ), dtype=bool) Input a: [ True False True False] Input b: [ True False False True] Return type: Tensor("logical_and:0", shape=(4, ), dtype=bool) Output: [ True False True True]
Please Login to comment...