From c41fbd96b707d6f65f05b77ed7bf9563e133e5c4 Mon Sep 17 00:00:00 2001 From: Zirui Wu Date: Thu, 16 Jul 2020 09:47:05 -0400 Subject: [PATCH] fix minor comments follow up --- mindspore/ccsrc/minddata/dataset/kernels/compose_op.cc | 3 +-- .../dataset/kernels/image/random_select_subpolicy_op.cc | 2 +- .../ccsrc/minddata/dataset/kernels/random_apply_op.cc | 2 +- .../ccsrc/minddata/dataset/kernels/random_choice_op.cc | 2 +- .../ccsrc/minddata/dataset/text/kernels/lookup_op.cc | 8 ++++---- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mindspore/ccsrc/minddata/dataset/kernels/compose_op.cc b/mindspore/ccsrc/minddata/dataset/kernels/compose_op.cc index 35128d3e8..152d779f1 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/compose_op.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/compose_op.cc @@ -1,5 +1,5 @@ /** - * Copyright 2019 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ #include #include "minddata/dataset/core/tensor.h" -#include "minddata/dataset/kernels/py_func_op.h" #include "minddata/dataset/kernels/tensor_op.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/random_select_subpolicy_op.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/random_select_subpolicy_op.cc index 3a789ab34..d01231f1f 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/random_select_subpolicy_op.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/random_select_subpolicy_op.cc @@ -1,5 +1,5 @@ /** - * Copyright 2019 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/ccsrc/minddata/dataset/kernels/random_apply_op.cc b/mindspore/ccsrc/minddata/dataset/kernels/random_apply_op.cc index 783d5077c..40bd55101 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/random_apply_op.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/random_apply_op.cc @@ -1,5 +1,5 @@ /** - * Copyright 2019 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/ccsrc/minddata/dataset/kernels/random_choice_op.cc b/mindspore/ccsrc/minddata/dataset/kernels/random_choice_op.cc index fc81e8574..e54278fdd 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/random_choice_op.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/random_choice_op.cc @@ -1,5 +1,5 @@ /** - * Copyright 2019 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/mindspore/ccsrc/minddata/dataset/text/kernels/lookup_op.cc b/mindspore/ccsrc/minddata/dataset/text/kernels/lookup_op.cc index 02b75bc4f..d1b4ad24b 100644 --- a/mindspore/ccsrc/minddata/dataset/text/kernels/lookup_op.cc +++ b/mindspore/ccsrc/minddata/dataset/text/kernels/lookup_op.cc @@ -26,7 +26,7 @@ LookupOp::LookupOp(std::shared_ptr vocab, WordIdType default_id) Status LookupOp::Compute(const std::shared_ptr &input, std::shared_ptr *output) { IO_CHECK(input, output); RETURN_UNEXPECTED_IF_NULL(vocab_); - CHECK_FAIL_RETURN_UNEXPECTED(input->type() == DataType::DE_STRING, "None String Tensor."); + CHECK_FAIL_RETURN_UNEXPECTED(input->type() == DataType::DE_STRING, "None string tensor received."); std::vector word_ids; word_ids.reserve(input->Size()); for (auto itr = input->begin(); itr != input->end(); itr++) { @@ -34,7 +34,7 @@ Status LookupOp::Compute(const std::shared_ptr &input, std::shared_ptrshape(), type_, @@ -42,8 +42,8 @@ Status LookupOp::Compute(const std::shared_ptr &input, std::shared_ptr &inputs, std::vector &outputs) { - CHECK_FAIL_RETURN_UNEXPECTED(inputs.size() == NumInput() && outputs.size() == NumOutput(), "size doesn't match"); - CHECK_FAIL_RETURN_UNEXPECTED(inputs[0] == DataType::DE_STRING, "None String tensor type"); + CHECK_FAIL_RETURN_UNEXPECTED(inputs.size() == NumInput() && outputs.size() == NumOutput(), "size doesn't match."); + CHECK_FAIL_RETURN_UNEXPECTED(inputs[0] == DataType::DE_STRING, "None String tensor type."); outputs[0] = type_; return Status::OK(); } -- GitLab