Skip to content

Commit 44dbc33

Browse files
committed
fix ut
1 parent c751c82 commit 44dbc33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/pybind/slice_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,9 @@ static paddle::Tensor dealWithValues(const paddle::Tensor& tensor,
609609
tensor.dtype() == phi::DataType::INT16 ||
610610
tensor.dtype() == phi::DataType::INT8 ||
611611
tensor.dtype() == phi::DataType::UINT8) {
612-
values->push_back(value_obj_tmp.cast<int32_t>());
612+
values->push_back(value_obj_tmp.cast<float>());
613613
} else if (tensor.dtype() == phi::DataType::INT64) {
614-
values->push_back(value_obj_tmp.cast<int64_t>());
614+
values->push_back(value_obj_tmp.cast<double>());
615615
} else if (tensor.dtype() == phi::DataType::BOOL) {
616616
values->push_back(value_obj_tmp.cast<bool>());
617617
} else if (tensor.dtype() == phi::DataType::COMPLEX64) {

0 commit comments

Comments
 (0)