fix TypeError to ValueError

This commit is contained in:
yeyunpeng2020 2022-07-27 17:20:01 +08:00
parent aa07834bf1
commit 6918e5293a
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ abstract::ShapePtr RandomCategoricalInferShape(const PrimitivePtr &primitive,
return logits_shape_ptr->cast<abstract::ShapePtr>();
}
if (logits_shape.size() != kDim2) {
MS_EXCEPTION(TypeError) << "logits shape size only support 2D";
MS_EXCEPTION(ValueError) << "logits shape size only support 2D";
}
std::vector<int64_t> output_shape;
for (size_t i = 0; i < logits_shape.size() - 1; ++i) {