ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir::ops::FullyConnectedOp Class Reference

#include <FullyConnectedOp.h>

Collaboration diagram for mir::ops::FullyConnectedOp:

Public Member Functions

 FullyConnectedOp (Output *input, Output *weights)
 
 FullyConnectedOp (Output *input, Output *weights, Output *bias)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
- Public Member Functions inherited from mir::Operation
virtual ~Operation ()=default
 
Type getType () const
 
std::size_t getId () const
 
void setId (std::size_t id)
 
std::size_t getNumInputs () const
 
std::size_t getNumOutputs () const
 
std::deque< Output * > & getInputs ()
 
const std::deque< Output * > & getInputs () const
 
std::deque< Output > & getOutputs ()
 
const std::deque< Output > & getOutputs () const
 
OutputgetInput (std::size_t index)
 
const OutputgetInput (std::size_t index) const
 
OutputgetOutput (std::size_t index)
 
const OutputgetOutput (std::size_t index) const
 
const ShapegetInputShape (std::size_t index) const
 
const ShapegetOutputShape (std::size_t index) const
 
void accept (IVisitor *v)
 

Additional Inherited Members

- Public Types inherited from mir::Operation
enum class  Type { HANDLE_OP }
 
- Protected Member Functions inherited from mir::Operation
 Operation (Type type, const std::vector< Output * > &inputs, std::size_t num_outputs=1)
 
void setOutputType (std::size_t index, const TensorType &type)
 

Detailed Description

Definition at line 28 of file FullyConnectedOp.h.

Constructor & Destructor Documentation

◆ FullyConnectedOp() [1/2]

mir::ops::FullyConnectedOp::FullyConnectedOp ( Output input,
Output weights 
)
inline

Definition at line 31 of file FullyConnectedOp.h.

32 : Operation(Type::fullyConnected, {input, weights})
33 {
34 inferOutputTypes();
35 }

◆ FullyConnectedOp() [2/2]

mir::ops::FullyConnectedOp::FullyConnectedOp ( Output input,
Output weights,
Output bias 
)
inline

Definition at line 37 of file FullyConnectedOp.h.

38 : Operation(Type::fullyConnected, {input, weights, bias})
39 {
40 inferOutputTypes();
41 }

Member Function Documentation

◆ copyWithInputs()

Operation * mir::ops::FullyConnectedOp::copyWithInputs ( const std::vector< Output * > &  inputs)
inlineoverridevirtual

Implements mir::Operation.

Definition at line 43 of file FullyConnectedOp.h.

44 {
45 if (inputs.size() == 2)
46 return new FullyConnectedOp(inputs[0], inputs[1]);
47 else
48 return new FullyConnectedOp(inputs[0], inputs[1], inputs[2]);
49 }
FullyConnectedOp(Output *input, Output *weights)

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