def test_SelfAdjointEigV2(self):
t = tf.self_adjoint_eig(np.array(3 * [3, 2, 2, 1]).reshape(3, 2, 2).astype("float32"))
# the order of eigen vectors and values may differ between tf and np, so only compare sum
# and mean
# also, different numerical algorithms are used, so account for difference in precision by
# comparing numbers with 4 digits
self.check(t, ndigits=4, stats=True, abs=True)
评论列表
文章目录