Python tensorflow 模块,logical_xor() 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用tensorflow.logical_xor()

项目:zhusuan    作者:thu-ml    | 项目源码 | 文件源码
def __xor__(self, other):
        return tf.logical_xor(self, other)
项目:zhusuan    作者:thu-ml    | 项目源码 | 文件源码
def __rxor__(self, other):
        return tf.logical_xor(other, self)

    # boolean operations
项目:lsdc    作者:febert    | 项目源码 | 文件源码
def setUp(self):
    super(LogicalBinaryOpsTest, self).setUp()

    self.ops = [
        ('logical_and', operator.and_, tf.logical_and, core.logical_and),
        ('logical_or', operator.or_, tf.logical_or, core.logical_or),
        ('logical_xor', operator.xor, tf.logical_xor, core.logical_xor),
    ]
    self.test_lt_1 = self.original_lt < 10
    self.test_lt_2 = self.original_lt < 5
    self.test_lt_1_broadcast = self.test_lt_1.tensor
    self.test_lt_2_broadcast = self.test_lt_2.tensor
    self.broadcast_axes = self.test_lt_1.axes