|
| bool | epoch (int64_t epoch) override |
| | Initializes epoch.
|
| |
| torch::Tensor | loss (const torch::Tensor &outputs, int64_t epoch) override |
| | Computes the loss function.
|
| |
| | IgANet (const IgANetOptions &defaults={}, iganet::Options< typename Base::value_type > options=iganet::Options< typename Base::value_type >{}) |
| | Default constructor.
|
| |
| | IgANet (const std::vector< int64_t > &layers, const std::vector< std::vector< std::any > > &activations, const NumCoeffs &numCoeffs, enum init init=init::greville, IgANetOptions defaults={}, iganet::Options< typename Base::value_type > options=iganet::Options< typename Base::value_type >{}) |
| | Constructor: number of layers, activation functions, and number of spline coefficients (same for all inputs and outputs)
|
| |
| | IgANet (const std::vector< int64_t > &layers, const std::vector< std::vector< std::any > > &activations, const NumCoeffsInputs &numCoeffsInputs, const NumCoeffsOutputs &numCoeffsOutputs, enum init init=init::greville, IgANetOptions defaults={}, iganet::Options< typename Base::value_type > options=iganet::Options< typename Base::value_type >{}) |
| | Constructor: number of layers, activation functions, and number of spline coefficients (same for all inputs and outputs)
|
| |
| void | eval () |
| | Evaluate IgANet.
|
| |
| constexpr auto & | inputs () |
| | Returns a non-constant reference to the tuple of input objects.
|
| |
| constexpr const auto & | inputs () const |
| | Returns a constant reference to the tuple of input objects.
|
| |
| virtual void | inputs (const torch::Tensor &tensor) |
| | Attaches the given tensor to the inputs.
|
| |
| virtual torch::Tensor | inputs (int64_t epoch) const |
| | Returns the network inputs as tensor.
|
| |
| void | load (const std::string &filename, const std::string &key="iganet") |
| | Loads the IgANet from file.
|
| |
| torch::OrderedDict< std::string, torch::Tensor > | named_parameters () const noexcept |
| | Returns a constant reference to the named parameters of the IgANet object.
|
| |
| IgANetGenerator< typename Base::value_type > & | net () |
| | Returns a non-constant reference to the IgANet generator.
|
| |
| const IgANetGenerator< typename Base::value_type > & | net () const |
| | Returns a constant reference to the IgANet generator.
|
| |
| std::size_t | nparameters () const noexcept |
| | Returns the total number of parameters of the IgANet object.
|
| |
| bool | operator!= (const IgANet &other) const |
| | Returns true if both IgANet objects are different.
|
| |
| bool | operator== (const IgANet &other) const |
| | Returns true if both IgANet objects are the same.
|
| |
| optimizer_type & | optimizer () |
| | Returns a non-constant reference to the optimizer.
|
| |
| const optimizer_type & | optimizer () const |
| | Returns a constant reference to the optimizer.
|
| |
| optimizer_options_type & | optimizerOptions (std::size_t param_group=0) |
| | Returns a non-constant reference to the optimizer options.
|
| |
| const optimizer_options_type & | optimizerOptions (std::size_t param_group=0) const |
| | Returns a constant reference to the optimizer options.
|
| |
| void | optimizerOptionsReset (const optimizer_options_type &options) |
| | Resets the optimizer options.
|
| |
| void | optimizerOptionsReset (const optimizer_options_type &options, std::size_t param_group) |
| | Resets the optimizer options.
|
| |
| void | optimizerOptionsReset (optimizer_options_type &&options) |
| | Resets the optimizer options.
|
| |
| void | optimizerOptionsReset (optimizer_options_type &&options, std::size_t param_group) |
| | Resets the optimizer options.
|
| |
| void | optimizerReset (bool resetOptions=true) |
| | Resets the optimizer.
|
| |
| void | optimizerReset (const optimizer_options_type &optimizerOptions) |
| | Resets the optimizer.
|
| |
| auto & | options () |
| | Returns a non-constant reference to the options structure.
|
| |
| const auto & | options () const |
| | Returns a constant reference to the options structure.
|
| |
| constexpr auto & | outputs () |
| | Returns a non-constant reference to the tuple of output objects.
|
| |
| constexpr const auto & | outputs () const |
| | Returns a constant reference to the tuple of output objects.
|
| |
| virtual void | outputs (const torch::Tensor &tensor) |
| | Attaches the given tensor to the outputs.
|
| |
| virtual torch::Tensor | outputs (int64_t epoch) const |
| | Returns the network outputs as tensor.
|
| |
| std::vector< torch::Tensor > | parameters () const noexcept |
| | Returns a constant reference to the parameters of the IgANet object.
|
| |
| void | pretty_print (std::ostream &os) const noexcept override |
| | Returns a string representation of the IgANet object.
|
| |
| torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="iganet") |
| | Loads the IgANet from a torch::serialize::InputArchive object.
|
| |
| torch::Tensor & | register_parameter (std::string name, torch::Tensor tensor, bool requires_grad=true) |
| | Registers a parameter.
|
| |
| void | save (const std::string &filename, const std::string &key="iganet") const |
| | Saves the IgANet to file.
|
| |
| nlohmann::json | to_json () const override |
| | Returns the IgANet object as JSON object.
|
| |
| virtual void | train () |
| | Trains the IgANet.
|
| |
| void | train (DataLoader &loader) |
| | Trains the IgANet.
|
| |
| torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="iganet") const |
| | Writes the IgANet into a torch::serialize::OutputArchive object.
|
| |