diff options
Diffstat (limited to 'src/armnn/layers/InputLayer.cpp')
-rw-r--r-- | src/armnn/layers/InputLayer.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/armnn/layers/InputLayer.cpp b/src/armnn/layers/InputLayer.cpp new file mode 100644 index 0000000000..96f1b773f4 --- /dev/null +++ b/src/armnn/layers/InputLayer.cpp @@ -0,0 +1,37 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// See LICENSE file in the project root for full license information. +// +#include "InputLayer.hpp" + +#include "LayerCloneBase.hpp" + +#include <backends/WorkloadData.hpp> +#include <backends/WorkloadFactory.hpp> + +namespace armnn +{ + +InputLayer::InputLayer(LayerBindingId id, const char* name) + : BindableLayer(0, 1, LayerType::Input, name, id) +{ +} + +std::unique_ptr<IWorkload> InputLayer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const +{ + return nullptr; +} + +InputLayer* InputLayer::Clone(Graph& graph) const +{ + return CloneBase<InputLayer>(graph, GetBindingId(), GetName()); +} + +void InputLayer::ValidateTensorShapesFromInputs() +{ + //The input layer should already have it's inputs set during graph building phase in the driver/parser. + ConditionalThrow<LayerValidationException>(GetOutputSlot(0).IsTensorInfoSet(), + "InputLayer should already have the TensorInfo set."); +} + +} // namespace |