30 const vector<ScalerMethod>&
get_scalers()
const {
return scalers; }
68 const vector<string>& output_names)
const override;
72 vector<Descriptives> descriptives;
73 vector<ScalerMethod> scalers;
74 float min_range = -1.0f;
75 float max_range = 1.0f;
78 bool op_storage_dirty =
true;
82 void refresh_op_storage(
Device device);
Shape input_shape
Definition layer.h:256
VectorR get_maximums() const
Returns the per-variable maximum values from the stored descriptive statistics.
void set_min_max_range(float min, float max)
Sets the target output range used by min-max scaling methods.
void set_input_shape(const Shape &) override
Sets the input shape; subclasses override to derive dependent dimensions.
float get_min_range() const
Definition scaling_layer.h:41
void set(const Shape &={})
Reconfigures the layer with a new input shape, resetting descriptives and scalers.
const vector< ScalerMethod > & get_scalers() const
Definition scaling_layer.h:30
Scaling(const Shape &={})
Constructs a scaling layer for the given input shape.
VectorR get_means() const
Returns the per-variable means from the stored descriptive statistics.
void set_scalers(const vector< string > &)
Sets the scaling method for each input variable from a vector of method names.
string write_expression(const vector< string > &input_names, const vector< string > &output_names) const override
Returns a human-readable mathematical expression for this layer (empty by default).
void set_scalers(const string &)
Sets the same scaling method for all input variables from its name.
float * link_states(float *) override
Binds the persistent-state region of the shared buffer to operator views.
void set_descriptives(const vector< Descriptives > &)
Sets the descriptive statistics (min, max, mean, stddev) used for scaling each variable.
Shape get_output_shape() const override
Returns the output shape; subclasses must implement this to expose their geometry.
Definition scaling_layer.h:27
VectorR get_standard_deviations() const
Returns the per-variable standard deviations from the stored descriptive statistics.
VectorR get_minimums() const
Returns the per-variable minimum values from the stored descriptive statistics.
void write_JSON_body(JsonWriter &) const override
Subclass hook writing the body section of the layer's JSON node.
float get_max_range() const
Definition scaling_layer.h:42
void read_JSON_body(const Json *) override
Subclass hook reading the body section of the layer's JSON node.
const vector< Descriptives > & get_descriptives() const
Definition scaling_layer.h:29
Definition adaptive_moment_estimation.h:14
Device
Execution device selection for OpenNN runtime (auto-detected, CPU or CUDA GPU).
Definition configuration.h:17
Matrix< float, Dynamic, 1 > VectorR
Definition pch.h:181
Owning raw byte buffer that lives on CPU or CUDA memory, with aligned (re)allocation.
Definition tensor_utilities.h:166
Scales inputs to a target range using per-feature minimum/maximum or mean/std statistics.
Definition operators.h:1019
Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank).
Definition tensor_utilities.h:42