transform/state_ops_declare.cc

26 lines
1.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Copyright 2019 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.
*/
#include "transform/graph_ir/op_declare/state_ops_declare.h"
//"Variable" 运算符通常用于表示模型中的变量(例如权重和偏置项)
namespace mindspore::transform {
// Variable
INPUT_MAP(Variable) = {{1, INPUT_DESC(x)}};
// 定义 "Variable" 运算符的输入映射(INPUT_MAP)将输入1映射为名为 "x" 的输入描述(INPUT_DESC)
ATTR_MAP(Variable) = EMPTY_ATTR_MAP;
// 定义 "Variable" 运算符的属性映射(ATTR_MAP),此处为空(EMPTY_ATTR_MAP)
} // namespace mindspore::transform