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