python类logical_xor()的实例源码

utils.py 文件源码 项目:zhusuan 作者: thu-ml 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __xor__(self, other):
        return tf.logical_xor(self, other)
utils.py 文件源码 项目:zhusuan 作者: thu-ml 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __rxor__(self, other):
        return tf.logical_xor(other, self)

    # boolean operations
core_test.py 文件源码 项目:lsdc 作者: febert 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
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


问题


面经


文章

微信
公众号

扫码关注公众号