def test_batch_left_interp_on_a_batch_matrix():
batch_matrix = torch.randn(2, 6, 3)
res = left_interp(batch_interp_indices, batch_interp_values, Variable(batch_matrix)).data
actual = torch.matmul(batch_interp_matrix, batch_matrix)
assert approx_equal(res, actual)
评论列表
文章目录