|
OpenNN
Open-source neural networks library
|
#include <operators.h>
Public Member Functions | |
| void | set (Index input_features, Index heads_number, Index head_dimension, Type compute_dtype) |
| vector< pair< Shape, Type > > | parameter_specs () const override |
| void | link_parameters (const vector< TensorView > &views) override |
| void | link_gradients (const vector< TensorView > &views) override |
| void | set_parameters_random () override |
| void | set_parameters_glorot () override |
| void | apply (const TensorView &input, TensorView &head_output, float *scratch) |
| void | apply_delta (const TensorView &head_gradient, const TensorView &input, TensorView &input_gradient, bool accumulate, float *scratch) const |
Public Member Functions inherited from opennn::Operator | |
| virtual | ~Operator ()=default |
| virtual vector< pair< Shape, Type > > | state_specs () const |
| virtual void | link_states (const vector< TensorView > &) |
| virtual void | forward_propagate (ForwardPropagation &, size_t, bool) noexcept |
| virtual void | to_JSON (JsonWriter &) const |
| virtual void | from_JSON (const Json *) |
| virtual void | load_state_from_JSON (const Json *) |
| virtual void | destroy_cuda () |
Public Attributes | |
| Combination | combination |
| Index | input_features = 0 |
| Index | heads_number = 0 |
| Index | head_dimension = 0 |
| Type | compute_dtype = Type::FP32 |
Public Attributes inherited from opennn::Operator | |
| vector< size_t > | input_slots |
| vector< size_t > | output_slots |
| void opennn::MultiHeadProjection::apply | ( | const TensorView & | input, |
| TensorView & | head_output, | ||
| float * | scratch ) |
| void opennn::MultiHeadProjection::apply_delta | ( | const TensorView & | head_gradient, |
| const TensorView & | input, | ||
| TensorView & | input_gradient, | ||
| bool | accumulate, | ||
| float * | scratch ) const |
|
inlineoverridevirtual |
Reimplemented from opennn::Operator.
|
inlineoverridevirtual |
Reimplemented from opennn::Operator.
|
inlineoverridevirtual |
Reimplemented from opennn::Operator.
| void opennn::MultiHeadProjection::set | ( | Index | input_features, |
| Index | heads_number, | ||
| Index | head_dimension, | ||
| Type | compute_dtype ) |
|
inlineoverridevirtual |
Reimplemented from opennn::Operator.
|
inlineoverridevirtual |
Reimplemented from opennn::Operator.
| Combination opennn::MultiHeadProjection::combination |
| Type opennn::MultiHeadProjection::compute_dtype = Type::FP32 |
| Index opennn::MultiHeadProjection::head_dimension = 0 |
| Index opennn::MultiHeadProjection::heads_number = 0 |
| Index opennn::MultiHeadProjection::input_features = 0 |