Loading...
Searching...
No Matches
scaling_layer.h
Go to the documentation of this file.
Definition json.h:85
Definition json.h:23
Layer()=default
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.
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.
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
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