Configuration class for Softmax module.
More...
|
| | SoftmaxConfig ()=default |
| | Default constructor.
|
| |
| int64_t | getAxis () const |
| | Get the configured axis value.
|
| |
| void | validate () const |
| | Validate configuration parameters.
|
| |
| SoftmaxConfig & | withAxis (int64_t axis) |
| | Set the axis along which to apply the softmax operation.
|
| |
| virtual | ~ComponentConfig ()=default |
| | Virtual destructor to support proper polymorphic destruction.
|
| |
| const std::string & | getName () const |
| | Gets the configured component name.
|
| |
| ComputePrecision::Policy | getPrecision () const |
| | Gets the configured precision policy.
|
| |
| bool | isTraining () const |
| | Gets the configured training mode.
|
| |
| template<typename Self > |
| auto & | withName (this Self &&self, std::string name) |
| | Sets the name of the component with fluent interface.
|
| |
| template<typename Self > |
| auto & | withPrecision (this Self &&self, ComputePrecision::Policy policy) |
| | Sets the compute precision policy with fluent interface.
|
| |
| template<typename Self > |
| auto & | withTraining (this Self &&self, bool is_training) |
| | Sets the training mode with fluent interface.
|
| |
Configuration class for Softmax module.
Provides a type-safe fluent interface for configuring Softmax modules.
◆ SoftmaxConfig()
| Mila::Dnn::SoftmaxConfig::SoftmaxConfig |
( |
| ) |
|
|
default |
◆ getAxis()
| int64_t Mila::Dnn::SoftmaxConfig::getAxis |
( |
| ) |
const |
|
inline |
Get the configured axis value.
- Returns
- int64_t The axis along which softmax will be computed
◆ validate()
| void Mila::Dnn::SoftmaxConfig::validate |
( |
| ) |
const |
|
inlinevirtual |
Validate configuration parameters.
- Exceptions
-
| std::invalid_argument | If validation fails |
Reimplemented from Mila::Dnn::ComponentConfig.
◆ withAxis()
| SoftmaxConfig & Mila::Dnn::SoftmaxConfig::withAxis |
( |
int64_t |
axis | ) |
|
|
inline |
Set the axis along which to apply the softmax operation.
- Parameters
-
| axis | Dimension for softmax computation (default: -1 for last dimension) |
- Returns
- SoftmaxConfig& Reference to this for method chaining
◆ axis_
| int64_t Mila::Dnn::SoftmaxConfig::axis_ = -1 |
|
private |
The documentation for this class was generated from the following file: