surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include "LayerWithParameters.hpp" |
| 8 | |
| 9 | namespace armnn |
| 10 | { |
| 11 | |
| 12 | class ScopedCpuTensorHandle; |
| 13 | |
| 14 | class BatchNormalizationLayer : public LayerWithParameters<BatchNormalizationDescriptor> |
| 15 | { |
| 16 | public: |
| 17 | std::unique_ptr<ScopedCpuTensorHandle> m_Mean; |
| 18 | std::unique_ptr<ScopedCpuTensorHandle> m_Variance; |
| 19 | std::unique_ptr<ScopedCpuTensorHandle> m_Beta; |
| 20 | std::unique_ptr<ScopedCpuTensorHandle> m_Gamma; |
| 21 | |
| 22 | virtual std::unique_ptr<IWorkload> CreateWorkload(const Graph& graph, |
| 23 | const IWorkloadFactory& factory) const override; |
| 24 | |
| 25 | BatchNormalizationLayer* Clone(Graph& graph) const override; |
| 26 | |
| 27 | void ValidateTensorShapesFromInputs() override; |
| 28 | |
| 29 | protected: |
| 30 | BatchNormalizationLayer(const BatchNormalizationDescriptor& param, const char* name); |
| 31 | ~BatchNormalizationLayer() = default; |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 32 | |
| 33 | ConstantTensors GetConstantTensorsByRef() override; |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace |