未验证 提交 6ec8d856 编写于 作者: J JYChen 提交者: GitHub

up index warning level (#53691)

* up warning level

* numpy still vlog-0
上级 49de9de5
...@@ -931,7 +931,7 @@ static PyObject* tensor__getitem_index_not_tensor(TensorObject* self, ...@@ -931,7 +931,7 @@ static PyObject* tensor__getitem_index_not_tensor(TensorObject* self,
// with FLAGS_set_to_1d=True. In this case, one `None` should be pop out, // with FLAGS_set_to_1d=True. In this case, one `None` should be pop out,
// otherwise the output shape will be not correct. // otherwise the output shape will be not correct.
if (static_cast<int>(decrease_axis.size()) == tensor->dims().size()) { if (static_cast<int>(decrease_axis.size()) == tensor->dims().size()) {
VLOG(0) VLOG(1)
<< "Warning: In Tensor '__getitem__', if the number of scalar " << "Warning: In Tensor '__getitem__', if the number of scalar "
"elements " "elements "
"in the index is equal to the rank of the Tensor, the output " "in the index is equal to the rank of the Tensor, the output "
......
...@@ -1060,7 +1060,7 @@ void BindImperative(py::module *m_ptr) { ...@@ -1060,7 +1060,7 @@ void BindImperative(py::module *m_ptr) {
// not correct. // not correct.
if (static_cast<int>(decrease_axis.size()) == if (static_cast<int>(decrease_axis.size()) ==
tensor->dims().size()) { tensor->dims().size()) {
VLOG(0) << "Warning: In Tensor '__getitem__', if the number " VLOG(1) << "Warning: In Tensor '__getitem__', if the number "
"of scalar " "of scalar "
"elements " "elements "
"in the index is equal to the rank of the Tensor, " "in the index is equal to the rank of the Tensor, "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册