!14061 [lite]fix fill infer bug

From: @xu_anyue
Reviewed-by: @hangangqiang,@HilbertDavid
Signed-off-by: @hangangqiang
This commit is contained in:
mindspore-ci-bot 2021-03-25 19:04:56 +08:00 committed by Gitee
commit b141cb879c
3 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ int FillInferShape(const TensorC *const *inputs, size_t inputs_size, TensorC **o
if (!parameter->infer_flag_) {
return NNACL_INFER_INVALID;
}
if (num_dims != 0 && dst_shape == NULL) {
return NNACL_INFER_INVALID;
}
int output_shape[MAX_SHAPE_SIZE];
size_t output_shape_size = 0;
for (size_t i = 0; i < num_dims; i++) {