ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 27 of file ReshapeLayer.h.

Constructor & Destructor Documentation

◆ ReshapeLayer()

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

Definition at line 22 of file ReshapeLayer.cc.

23 : _input{nullptr}, _shape{nullptr}, _output{nullptr}, _back_prop_input{nullptr},
24 _back_prop_output{nullptr}
25{
26 // DO NOTHING
27}

Member Function Documentation

◆ backward()

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

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

Definition at line 53 of file ReshapeLayer.cc.

53{ 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 35 of file ReshapeLayer.cc.

37{
38 _input = input;
39 /* note : shape is optional. If not provided from model, _shape is nullptr. */
40 _shape = shape;
41 _output = output;
42}

◆ configureBackward()

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

Definition at line 44 of file ReshapeLayer.cc.

46{
47 _back_prop_input = back_prop_input;
48 _back_prop_output = back_prop_output;
49}

◆ forward()

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

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

Definition at line 51 of file ReshapeLayer.cc.

51{ reshapeGeneric(_input, _output); }

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