IgANetGeneratorImpl.
More...
#include </home/runner/work/iganet/iganet/include/iganet/net/generator.hpp>
|
| | IgANetGeneratorImpl ()=default |
| | Default constructor.
|
| |
| | IgANetGeneratorImpl (const std::vector< int64_t > &layers, const std::vector< std::vector< std::any > > &activations, Options< real_t > options=Options< real_t >{}) |
| | Constructor.
|
| |
| torch::Tensor | forward (torch::Tensor x) |
| | Forward evaluation.
|
| |
| void | pretty_print (std::ostream &os) const noexcept override |
| | Provides the pretty_print operation.
|
| |
| torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="iganet") |
| | Reads the IgANet from a torch::serialize::InputArchive object.
|
| |
| torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="iganet") const |
| | Writes the IgANet into a torch::serialize::OutputArchive object.
|
| |
template<typename real_t>
class iganet::IgANetGeneratorImpl< real_t >
IgANetGeneratorImpl.
- Note
- Following the discussion of module overship here.
https://pytorch.org/tutorials/advanced/cpp_frontend.html#module-ownership.
we implement a generator implementation class following.
https://pytorch.org/tutorials/advanced/cpp_frontend.html#the-generator-module.
◆ IgANetGeneratorImpl() [1/2]
template<typename real_t >
◆ IgANetGeneratorImpl() [2/2]
template<typename real_t >
| iganet::IgANetGeneratorImpl< real_t >::IgANetGeneratorImpl |
( |
const std::vector< int64_t > & |
layers, |
|
|
const std::vector< std::vector< std::any > > & |
activations, |
|
|
Options< real_t > |
options = Options<real_t>{} |
|
) |
| |
|
inlineexplicit |
Constructor.
- Parameters
-
| layers | Value of layers. |
| activations | Value of activations. |
| options | Configuration options. |
◆ forward()
template<typename real_t >
Forward evaluation.
- Parameters
-
- Returns
- Result of the operation.
◆ pretty_print()
template<typename real_t >
Provides the pretty_print operation.
- Parameters
-
◆ read()
template<typename real_t >
| torch::serialize::InputArchive & iganet::IgANetGeneratorImpl< real_t >::read |
( |
torch::serialize::InputArchive & |
archive, |
|
|
const std::string & |
key = "iganet" |
|
) |
| |
|
inline |
Reads the IgANet from a torch::serialize::InputArchive object.
- Parameters
-
| archive | Serialization archive. |
| key | Serialization key. |
- Returns
- Result of the operation.
◆ write()
template<typename real_t >
| torch::serialize::OutputArchive & iganet::IgANetGeneratorImpl< real_t >::write |
( |
torch::serialize::OutputArchive & |
archive, |
|
|
const std::string & |
key = "iganet" |
|
) |
| const |
|
inline |
Writes the IgANet into a torch::serialize::OutputArchive object.
- Parameters
-
| archive | Serialization archive. |
| key | Serialization key. |
- Returns
- Result of the operation.
◆ activations_
template<typename real_t >
Vector of activation functions.
◆ layers_
template<typename real_t >
The documentation for this class was generated from the following file: