/** * Copyright 2019-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. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MINDSPORE_CCSRC_UTILS_CALLBACKS_H_ #define MINDSPORE_CCSRC_UTILS_CALLBACKS_H_ #include #include #include #include #include "ir/tensor.h" namespace mindspore { namespace callbacks { using mindspore::tensor::TensorPtr; // define the python callback module and function extern const char PYTHON_MOD_CALLBACK_MODULE[]; extern const char PYTHON_FUN_PROCESS_CHECKPOINT[]; extern const char PYTHON_FUN_PROCESS_SUMMARY[]; extern const char kSummary[]; extern const char kCheckPoint[]; extern const std::string kPythonCheckpointModuleName; extern const std::string kPythonCheckpointFuncName; const int kCallbackOk = 0; const int kCallbackFalied = 1; bool GetParameterShape(const FuncGraphPtr &anf_graph, const std::string ¶m_name, const std::shared_ptr> &shape); uint32_t SummarySaveCallback(uint32_t, const std::map &); } // namespace callbacks } // namespace mindspore #endif // MINDSPORE_CCSRC_UTILS_CALLBACKS_H_