ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FullyConnectedLayer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef __ONERT_BACKEND_RUY_OPS_FULLYCONNECTEDLAYER_H__
18#define __ONERT_BACKEND_RUY_OPS_FULLYCONNECTEDLAYER_H__
19
21#include "../ExternalContext.h"
22#include "OperationUtils.h"
23
24#include <exec/IFunction.h>
25
27{
28
30{
31public:
34
35public:
37
38 void configure(const IPortableTensor *input, const IPortableTensor *weights,
39 const IPortableTensor *bias, ir::Activation activation, IPortableTensor *output,
40 const std::shared_ptr<ExternalContext> &external_context);
41
42 void run() override;
43
44 void prepare() override;
45
46private:
47 const IPortableTensor *_input;
48 const IPortableTensor *_weights;
49 const IPortableTensor *_bias;
50 IPortableTensor *_output;
51
52 ir::Activation _activation;
53
54 std::shared_ptr<ExternalContext> _external_context;
55};
56
57} // namespace onert::backend::ruy::ops
58
59#endif // __ONERT_BACKEND_RUY_OPS_FULLYCONNECTEDLAYER_H__
A tensor class that is portable for other backends.
void configure(const IPortableTensor *input, const IPortableTensor *weights, const IPortableTensor *bias, ir::Activation activation, IPortableTensor *output, const std::shared_ptr< ExternalContext > &external_context)