Loading...
Searching...
No Matches
Public Member Functions |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
List of all members
opennn::Scaling Class Reference
#include <opennn/network/layers/scaling_layer.h>
Inheritance diagram for opennn::Scaling:
Public Member Functions | |
| Scaling (const Shape &={}) | |
| Scaling (const Shape &, ScalerMethod) | |
| Shape | get_output_shape () const noexcept override |
| const vector< Descriptives > & | get_descriptives () const noexcept |
| const vector< ScalerMethod > & | get_scalers () const noexcept |
| VectorR | get_minimums () const |
| VectorR | get_maximums () const |
| VectorR | get_means () const |
| VectorR | get_standard_deviations () const |
| float | get_min_range () const noexcept |
| float | get_max_range () const noexcept |
| bool | is_inverse () const noexcept |
| VariableRole | get_scaling_role () const noexcept override |
| FeatureScaling | get_feature_scaling () const override |
| void | set (const Shape &={}) |
| bool | accepts_input_rank (Index rank) const override |
| bool | skip_for_pre_scaled_input () const noexcept override |
| void | apply_input_shape (const Shape &) override |
| void | set_descriptives (const vector< Descriptives > &) |
| void | set_scalers (ScalerMethod) |
| void | set_scalers (const vector< string > &) |
| void | set_scalers (const string &) |
| void | set_feature_scaling (const FeatureScaling &) override |
| bool | is_passthrough () const |
| vector< TensorSpec > | get_forward_specs (Index) const override |
| void | forward_propagate (ForwardPropagation &, size_t, ForwardPropagationMode) override |
| float * | link_states (float *, Device) override |
| void | read_JSON_body (const Json *) override |
| void | write_JSON_body (JsonWriter &) const override |
| string | write_expression (const vector< string > &, const vector< string > &) const override |
Public Member Functions inherited from opennn::Layer | |
| virtual | ~Layer ()=default |
| const string & | get_label () const noexcept |
| const string & | get_name () const |
| LayerType | get_type () const noexcept |
| void | set_input_shape (const Shape &new_input_shape) |
| virtual void | set_output_shape (const Shape &) |
| void | set_label (string new_label) |
| Index | get_parameters_number () const |
| const vector< Operator * > & | get_operators () const noexcept |
| virtual vector< TensorSpec > | get_parameter_specs () const |
| virtual vector< TensorSpec > | get_state_specs () const |
| virtual vector< TensorSpec > | get_backward_specs (Index batch_size) const |
| virtual ForwardSlotKind | get_forward_slot_kind (size_t) const |
| virtual bool | is_forward_slot_inference_elidable (size_t, Device) const noexcept |
| virtual size_t | get_recomputable_forward_slot () const noexcept |
| virtual void | recompute_forward_slot (ForwardPropagation &, size_t) |
| virtual bool | backward_uses_forward_output () const noexcept |
| virtual bool | backward_uses_input (size_t) const noexcept |
| virtual bool | preserves_output_delta_during_backward () const noexcept |
| virtual bool | allows_input_delta_alias () const noexcept |
| virtual bool | folds_input_delta_addend (size_t) const noexcept |
| virtual Shape | get_input_shape () const noexcept |
| virtual ActivationFunction | get_output_activation () const |
| virtual Index | get_sources_number () const noexcept |
| virtual bool | allows_successors () const noexcept |
| virtual bool | is_recurrent () const noexcept |
| virtual bool | uses_sequence_position () const noexcept |
| virtual bool | allows_bf16_input_cast (size_t) const noexcept |
| Index | get_inputs_number () const noexcept |
| Index | get_outputs_number () const |
| virtual void | back_propagate (ForwardPropagation &forward_propagation, BackPropagation &back_propagation, size_t i) const |
| virtual void | from_JSON (const JsonDocument &) |
| virtual void | on_loaded () |
| virtual void | load_state_from_JSON (const JsonDocument &) |
| virtual void | to_JSON (JsonWriter &) const |
| bool | get_is_trainable () const noexcept |
| void | set_is_trainable (bool trainable) |
| Type | get_compute_dtype () const noexcept |
| Device | get_compute_device () const noexcept |
| void | set_compute_dtype (Type new_compute_dtype) |
| void | set_compute_device (Device new_compute_device) |
| virtual void | on_compute_dtype_changed () |
| float * | link_gradients (float *, Device) |
| vector< TensorView > & | get_parameter_views () |
| const vector< TensorView > & | get_parameter_views () const noexcept |
| vector< TensorView > & | get_parameter_scales () |
| const vector< TensorView > & | get_parameter_scales () const noexcept |
| vector< Operator::SlotQuantization > | get_parameter_quantization () const |
| virtual TiedWeight | get_tied_weight () const |
| virtual void | set_tied_weight (const TiedWeight &tied_weight) |
| void | redistribute_parameters_to_operators () |
Public Member Functions inherited from opennn::FeatureScalingEndpoint | |
| virtual | ~FeatureScalingEndpoint ()=default |
Protected Member Functions | |
| Scaling (LayerType, bool invert) | |
| void | refresh_op_storage (Device) |
| string | write_scaling_expression (const vector< string > &, const vector< string > &, bool inverse) const |
Protected Member Functions inherited from opennn::Layer | |
| Layer (LayerType type, Trainability trainability=Trainability::Trainable) | |
| float * | link_views_to_operators (vector< TensorView > &, float *, vector< TensorSpec >(Operator::*specs_fn)() const, void(Operator::*link_fn)(span< const TensorView >), Device) |
Static Protected Member Functions | |
| static string | affine_expression (string_view input, const AffineMap &) |
Static Protected Member Functions inherited from opennn::Layer | |
| static bool | refresh_feature_storage (Buffer &storage, bool &dirty, Device device, Index features, Index columns, const function< void(float *)> &fill) |
Protected Attributes | |
| vector< Descriptives > | descriptives |
| vector< ScalerMethod > | scalers |
| float | min_range = -1.0f |
| float | max_range = 1.0f |
| Buffer | op_storage |
| bool | op_storage_dirty = true |
| ScaleOperator | scale_op |
Protected Attributes inherited from opennn::Layer | |
| string | label = "my_layer" |
| bool | is_trainable = true |
| Shape | input_shape |
| Type | compute_dtype = Type::FP32 |
| Type | weights_dtype = Type::FP32 |
| Device | compute_device = Device::CPU |
| vector< TensorView > | parameters |
| vector< TensorView > | parameter_scales |
| vector< TensorView > | states |
| vector< Operator * > | operators |
Additional Inherited Members | |
Protected Types inherited from opennn::Layer | |
| enum | Forward { Input , Output } |
Constructor & Destructor Documentation
◆ Scaling() [1/3]
| opennn::Scaling::Scaling | ( | const Shape & | = {} | ) |
◆ Scaling() [2/3]
| opennn::Scaling::Scaling | ( | const Shape & | , |
| ScalerMethod | ) |
◆ Scaling() [3/3]
|
protected |
Member Function Documentation
◆ accepts_input_rank()
|
inlineoverridevirtual |
Reimplemented from opennn::Layer.
◆ affine_expression()
|
staticprotected |
◆ apply_input_shape()
|
overridevirtual |
Reimplemented from opennn::Layer.
Reimplemented in opennn::Unscaling.
◆ forward_propagate()
|
overridevirtual |
Reimplemented from opennn::Layer.
◆ get_descriptives()
|
inlinenoexcept |
◆ get_feature_scaling()
|
inlineoverridevirtual |
Implements opennn::FeatureScalingEndpoint.
◆ get_forward_specs()
|
overridevirtual |
Reimplemented from opennn::Layer.
◆ get_max_range()
|
inlinenoexcept |
◆ get_maximums()
|
inline |
◆ get_means()
|
inline |
◆ get_min_range()
|
inlinenoexcept |
◆ get_minimums()
|
inline |
◆ get_output_shape()
|
inlineoverridevirtualnoexcept |
Implements opennn::Layer.
◆ get_scalers()
|
inlinenoexcept |
◆ get_scaling_role()
|
inlineoverridevirtualnoexcept |
Implements opennn::FeatureScalingEndpoint.
◆ get_standard_deviations()
| VectorR opennn::Scaling::get_standard_deviations | ( | ) | const |
◆ is_inverse()
|
inlinenoexcept |
◆ is_passthrough()
| bool opennn::Scaling::is_passthrough | ( | ) | const |
◆ link_states()
|
overridevirtual |
Reimplemented from opennn::Layer.
◆ read_JSON_body()
|
overridevirtual |
Reimplemented from opennn::Layer.
Reimplemented in opennn::Unscaling.
◆ refresh_op_storage()
|
protected |
◆ set()
| void opennn::Scaling::set | ( | const Shape & | = {} | ) |
◆ set_descriptives()
| void opennn::Scaling::set_descriptives | ( | const vector< Descriptives > & | ) |
◆ set_feature_scaling()
|
overridevirtual |
Implements opennn::FeatureScalingEndpoint.
◆ set_scalers() [1/3]
| void opennn::Scaling::set_scalers | ( | const string & | ) |
◆ set_scalers() [2/3]
| void opennn::Scaling::set_scalers | ( | const vector< string > & | ) |
◆ set_scalers() [3/3]
| void opennn::Scaling::set_scalers | ( | ScalerMethod | ) |
◆ skip_for_pre_scaled_input()
|
inlineoverridevirtualnoexcept |
Reimplemented from opennn::Layer.
◆ write_expression()
|
overridevirtual |
Reimplemented from opennn::Layer.
Reimplemented in opennn::Unscaling.
◆ write_JSON_body()
|
overridevirtual |
Reimplemented from opennn::Layer.
Reimplemented in opennn::Unscaling.
◆ write_scaling_expression()
|
protected |
Member Data Documentation
◆ descriptives
|
protected |
◆ max_range
|
protected |
◆ min_range
|
protected |
◆ op_storage
|
protected |
◆ op_storage_dirty
|
protected |
◆ scale_op
|
protected |
◆ scalers
|
protected |
Public Member Functions inherited from