2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "internal/op/Softmax.h"
18 #include "internal/op/NodeVisitor.h"
31 void Node::accept(NodeVisitor &&v) const { v.visit(*this); }
33 } // namespace Softmax
36 } // namespace internal
47 Param::Param(uint32_t inputCount, const uint32_t *inputs, uint32_t outputCount,
48 const uint32_t *outputs)
50 assert(inputCount == 2 && outputCount == 1);
52 output_index = outputs[0];
54 // Each input should be interpreted as follows:
56 // 0 -> A 2-D or 4-D tensor, specifying the tensor to be reshaped.
57 // 1 -> FLOAT32 value, specifying the positive scaling factor for the exponent, beta.
58 input_index = inputs[0];
59 scale_index = inputs[1];
62 } // namespace Softmax
65 } // namespace internal