ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::train::ops::ReshapeLayer Class Reference

#include <ReshapeLayer.h>

Collaboration diagram for onert::backend::train::ops::ReshapeLayer:

Public Member Functions

 ReshapeLayer ()
 
void configure (const IPortableTensor *input, const IPortableTensor *shape, IPortableTensor *output)
 
void configureBackward (IPortableTensor *back_prop_input, const IPortableTensor *back_prop_output)
 
void forward (bool training) override
 
void backward () override
 
- Public Member Functions inherited from onert::exec::train::ITrainableFunction
virtual ~ITrainableFunction ()=default
 
virtual std::optional< backend::train::LayerScopeTensorsregisterLayerScopeTensors ()
 

Detailed Description

Definition at line 33 of file ReshapeLayer.h.

Constructor & Destructor Documentation

◆ ReshapeLayer()

onert::backend::train::ops::ReshapeLayer::ReshapeLayer ( )

Definition at line 28 of file ReshapeLayer.cc.

29 : _input{nullptr}, _shape{nullptr}, _output{nullptr}, _back_prop_input{nullptr},
30 _back_prop_output{nullptr}
31{
32 // DO NOTHING
33}

Member Function Documentation

◆ backward()

void onert::backend::train::ops::ReshapeLayer::backward ( )
overridevirtual

Implements onert::exec::train::ITrainableFunction.

Definition at line 59 of file ReshapeLayer.cc.

59{ reshapeGeneric(_back_prop_output, _back_prop_input); }

◆ configure()

void onert::backend::train::ops::ReshapeLayer::configure ( const IPortableTensor input,
const IPortableTensor shape,
IPortableTensor output 
)

Definition at line 41 of file ReshapeLayer.cc.

43{
44 _input = input;
45 /* note : shape is optional. If not provided from model, _shape is nullptr. */
46 _shape = shape;
47 _output = output;
48}

◆ configureBackward()

void onert::backend::train::ops::ReshapeLayer::configureBackward ( IPortableTensor back_prop_input,
const IPortableTensor back_prop_output 
)

Definition at line 50 of file ReshapeLayer.cc.

52{
53 _back_prop_input = back_prop_input;
54 _back_prop_output = back_prop_output;
55}

◆ forward()

void onert::backend::train::ops::ReshapeLayer::forward ( bool  training)
overridevirtual

Implements onert::exec::train::ITrainableFunction.

Definition at line 57 of file ReshapeLayer.cc.

57{ reshapeGeneric(_input, _output); }

The documentation for this class was generated from the following files: