未验证 提交 0e1b6144 编写于 作者: Z zhangkaihuo 提交者: GitHub

[Sparse] Fix indices (#47190)

* fix indices
上级 10881b6e
......@@ -20,7 +20,11 @@ namespace phi {
namespace sparse {
void IndicesInferMeta(const MetaTensor& x, MetaTensor* out) {
out->set_dims({-1});
// TODO(zhangkaihuo) Currently, we cannot get sparse_dim from tensor.
// correct shape is: shape[0] = x.sparse_dim()
// In the 3D point cloud model:
// the input x is 5-D tensor, non_zero_elements is 1-D tensor
out->set_dims({x.dims().size() - 1, -1});
out->set_dtype(DataType::INT32);
out->set_layout(DataLayout::NCHW);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册