René's URL Explorer Experiment


Title: Neural Network Modules (torch::nn) — PyTorch main documentation

Description: PyTorch C++ neural network modules — torch::nn API for defining and training models.

Keywords:

direct link

Domain: docs.pytorch.org


Hey, it has json ld scripts:
    {
       "@context": "https://schema.org",
       "@type": "Article",
       "name": "Neural Network Modules (torch::nn)",
       "headline": "Neural Network Modules (torch::nn)",
       "description": "PyTorch C++ neural network modules \u2014 torch::nn API for defining and training models.",
       "url": "/api/nn/index.html",
       "articleBody": "Neural Network Modules (torch::nn)# The torch::nn namespace provides neural network building blocks that mirror Python\u2019s torch.nn module. It uses a PIMPL (Pointer to Implementation) pattern where user-facing classes like Conv2d wrap internal Conv2dImpl classes. When to use torch::nn: Building neural network models in C++ Creating custom layers and modules Porting Python models to C++ for production inference Training models entirely in C++ Basic usage: #include \u003ctorch/torch.h\u003e // Define a simple model struct Net : torch::nn::Module { torch::nn::Conv2d conv1{nullptr}; torch::nn::Linear fc1{nullptr}; Net() { conv1 = register_module(\"conv1\", torch::nn::Conv2d( torch::nn::Conv2dOptions(1, 32, 3).stride(1).padding(1))); fc1 = register_module(\"fc1\", torch::nn::Linear(32 * 28 * 28, 10)); } torch::Tensor forward(torch::Tensor x) { x = torch::relu(conv1-\u003eforward(x)); x = x.view({-1, 32 * 28 * 28}); return fc1-\u003eforward(x); } }; // Create and use the model auto model = std::make_shared\u003cNet\u003e(); auto input = torch::randn({1, 1, 28, 28}); auto output = model-\u003eforward(input); Header Files# torch/nn.h - Main neural network header (includes all modules) torch/nn/module.h - Base Module class torch/nn/modules.h - All module implementations torch/nn/options.h - Options structs for modules torch/nn/functional.h - Functional API Module Base Class# All neural network modules inherit from torch::nn::Module, which provides parameter management, serialization, device/dtype conversion, and hooks. class Module : public std::enable_shared_from_this\u003cModule\u003e# The base class for all modules in PyTorch. .. note:: The design and implementation of this class is largely based on the Python API. You may want to consult the python documentation for :py:class:pytorch:torch.nn.Module for further clarification on certain methods or behavior. A Module is an abstraction over the implementation of some function or algorithm, possibly associated with some persistent data. A Module may contain further Modules (\u201csubmodules\u201d), each with their own implementation, persistent data and further submodules. Modules can thus be said to form a recursive tree structure. A Module is registered as a submodule to another Module by calling register_module(), typically from within a parent module\u2019s constructor. A distinction is made between three kinds of persistent data that may be associated with a Module: Parameters: tensors that record gradients, typically weights updated during the backward step (e.g. the weight of a Linear module), Buffers: tensors that do not record gradients, typically updated during the forward step, such as running statistics (e.g. mean and variance in the BatchNorm module), Any additional state, not necessarily tensors, required for the implementation or configuration of a Module. The first two kinds of state are special in that they may be registered with the Module system to allow convenient access and batch configuration. For example, registered parameters in any Module may be iterated over via the parameters() accessor. Further, changing the data type of a Module\u2019s registered parameters can be done conveniently via Module::to(), e.g. module-\u003eto(torch::kCUDA) to move all parameters to GPU memory. Lastly, registered parameters and buffers are handled specially during a clone() operation, which performs a deepcopy of a cloneable Module hierarchy. Parameters are registered with a Module via register_parameter. Buffers are registered separately via register_buffer. These methods are part of the public API of Module and are typically invoked from within a concrete Modules constructor. Subclassed by torch::nn::Cloneable\u003c SoftshrinkImpl \u003e, torch::nn::Cloneable\u003c PReLUImpl \u003e, torch::nn::Cloneable\u003c LogSoftmaxImpl \u003e, torch::nn::Cloneable\u003c L1LossImpl \u003e, torch::nn::Cloneable\u003c SequentialImpl \u003e, torch::nn::Cloneable\u003c HardshrinkImpl \u003e, torch::nn::Cloneable\u003c GLUImpl \u003e, torch::nn::Cloneable\u003c RReLUImpl \u003e, torch::nn::Cloneable\u003c ParameterDictImpl \u003e, torch::nn::Cloneable\u003c IdentityImpl \u003e, torch::nn::Cloneable\u003c FoldImpl \u003e, torch::nn::Cloneable\u003c EmbeddingBagImpl \u003e, torch::nn::Cloneable\u003c BilinearImpl \u003e, torch::nn::Cloneable\u003c TripletMarginWithDistanceLossImpl \u003e, torch::nn::Cloneable\u003c SoftminImpl \u003e, torch::nn::Cloneable\u003c SmoothL1LossImpl \u003e, torch::nn::Cloneable\u003c MultiLabelMarginLossImpl \u003e, torch::nn::Cloneable\u003c LeakyReLUImpl \u003e, torch::nn::Cloneable\u003c FunctionalImpl \u003e, torch::nn::Cloneable\u003c ELUImpl \u003e, torch::nn::Cloneable\u003c TanhshrinkImpl \u003e, torch::nn::Cloneable\u003c PairwiseDistanceImpl \u003e, torch::nn::Cloneable\u003c LogSigmoidImpl \u003e, torch::nn::Cloneable\u003c HardtanhImpl \u003e, torch::nn::Cloneable\u003c FractionalMaxPool2dImpl \u003e, torch::nn::Cloneable\u003c FlattenImpl \u003e, torch::nn::Cloneable\u003c CrossMapLRN2dImpl \u003e, torch::nn::Cloneable\u003c TransformerEncoderLayerImpl \u003e, torch::nn::Cloneable\u003c ThresholdImpl \u003e, torch::nn::Cloneable\u003c SoftsignImpl \u003e, torch::nn::Cloneable\u003c MultiMarginLossImpl \u003e, torch::nn::Cloneable\u003c FractionalMaxPool3dImpl \u003e, torch::nn::Cloneable\u003c CTCLossImpl \u003e, torch::nn::Cloneable\u003c UnfoldImpl \u003e, torch::nn::Cloneable\u003c SiLUImpl \u003e, torch::nn::Cloneable\u003c ParameterListImpl \u003e, torch::nn::Cloneable\u003c MultiheadAttentionImpl \u003e, torch::nn::Cloneable\u003c CELUImpl \u003e, torch::nn::Cloneable\u003c UpsampleImpl \u003e, torch::nn::Cloneable\u003c TransformerImpl \u003e, torch::nn::Cloneable\u003c SELUImpl \u003e, torch::nn::Cloneable\u003c PixelUnshuffleImpl \u003e, torch::nn::Cloneable\u003c LinearImpl \u003e, torch::nn::Cloneable\u003c HingeEmbeddingLossImpl \u003e, torch::nn::Cloneable\u003c EmbeddingImpl \u003e, torch::nn::Cloneable\u003c MultiLabelSoftMarginLossImpl \u003e, torch::nn::Cloneable\u003c CrossEntropyLossImpl \u003e, torch::nn::Cloneable\u003c TripletMarginLossImpl \u003e, torch::nn::Cloneable\u003c TransformerDecoderLayerImpl \u003e, torch::nn::Cloneable\u003c SoftMarginLossImpl \u003e, torch::nn::Cloneable\u003c LocalResponseNormImpl \u003e, torch::nn::Cloneable\u003c BCELossImpl \u003e, torch::nn::Cloneable\u003c LayerNormImpl \u003e, torch::nn::Cloneable\u003c AdaptiveLogSoftmaxWithLossImpl \u003e, torch::nn::Cloneable\u003c ReLUImpl \u003e, torch::nn::Cloneable\u003c ModuleListImpl \u003e, torch::nn::Cloneable\u003c HuberLossImpl \u003e, torch::nn::Cloneable\u003c GELUImpl \u003e, torch::nn::Cloneable\u003c SoftmaxImpl \u003e, torch::nn::Cloneable\u003c Softmax2dImpl \u003e, torch::nn::Cloneable\u003c SoftplusImpl \u003e, torch::nn::Cloneable\u003c SigmoidImpl \u003e, torch::nn::Cloneable\u003c PoissonNLLLossImpl \u003e, torch::nn::Cloneable\u003c ModuleDictImpl \u003e, torch::nn::Cloneable\u003c MishImpl \u003e, torch::nn::Cloneable\u003c UnflattenImpl \u003e, torch::nn::Cloneable\u003c ReLU6Impl \u003e, torch::nn::Cloneable\u003c MSELossImpl \u003e, torch::nn::Cloneable\u003c CosineSimilarityImpl \u003e, torch::nn::Cloneable\u003c CosineEmbeddingLossImpl \u003e, torch::nn::Cloneable\u003c TransformerDecoderImpl \u003e, torch::nn::Cloneable\u003c TanhImpl \u003e, torch::nn::Cloneable\u003c NLLLossImpl \u003e, torch::nn::Cloneable\u003c MarginRankingLossImpl \u003e, torch::nn::Cloneable\u003c BCEWithLogitsLossImpl \u003e, torch::nn::Cloneable\u003c TransformerEncoderImpl \u003e, torch::nn::Cloneable\u003c PixelShuffleImpl \u003e, torch::nn::Cloneable\u003c KLDivLossImpl \u003e, torch::nn::Cloneable\u003c GroupNormImpl \u003e, torch::nn::Cloneable\u003c Derived \u003e Public Types using ModuleApplyFunction = std::function\u003cvoid(Module\u0026)\u003e# using ConstModuleApplyFunction = std::function\u003cvoid(const Module\u0026)\u003e# using NamedModuleApplyFunction = std::function\u003cvoid(const std::string\u0026, Module\u0026)\u003e# using ConstNamedModuleApplyFunction = std::function\u003cvoid(const std::string\u0026, const Module\u0026)\u003e# using ModulePointerApplyFunction = std::function\u003cvoid(const std::shared_ptr\u003cModule\u003e\u0026)\u003e# using NamedModulePointerApplyFunction = std::function\u003cvoid(const std::string\u0026, const std::shared_ptr\u003cModule\u003e\u0026)\u003e# Public Functions explicit Module(std::string name)# Tells the base Module about the name of the submodule. Module()# Constructs the module without immediate knowledge of the submodule\u2019s name. The name of the submodule is inferred via RTTI (if possible) the first time .name() is invoked. Module(const Module\u0026) = default# Module \u0026operator=(const Module\u0026) = default# Module(Module\u0026\u0026) noexcept = default# Module \u0026operator=(Module\u0026\u0026) noexcept = default# virtual ~Module() = default# const std::string \u0026name() const noexcept# Returns the name of the Module. A Module has an associated name, which is a string representation of the kind of concrete Module it represents, such as \"Linear\" for the Linear module. Under most circumstances, this name is automatically inferred via runtime type information (RTTI). In the unusual circumstance that you have this feature disabled, you may want to manually name your Modules by passing the string name to the Module base class\u2019 constructor. virtual std::shared_ptr\u003cModule\u003e clone(const std::optional\u003cDevice\u003e \u0026device = std::nullopt) const# Performs a recursive deep copy of the module and all its registered parameters, buffers and submodules. Optionally, this method sets the current device to the one supplied before cloning. If no device is given, each parameter and buffer will be moved to the device of its source. .. attention:: Attempting to call the clone() method inherited from the base Module class (the one documented here) will fail. To inherit an actual implementation of clone(), you must subclass Cloneable. Cloneable is templatized on the concrete module type, and can thus properly copy a Module. This method is provided on the base class\u2019 API solely for an easier-to-use polymorphic interface. void apply(const ModuleApplyFunction \u0026function)# Applies the function to the Module and recursively to every submodule. The function must accept a Module\u0026. .. code-block:: cpp MyModule module; module-\u003eapply([](nn::Module\u0026 module) { std::cout \u003c\u003c module.name() \u003c\u003c std::endl; }); void apply(const ConstModuleApplyFunction \u0026function) const# Applies the function to the Module and recursively to every submodule. The function must accept a const Module\u0026. .. code-block:: cpp MyModule module; module-\u003eapply([](const nn::Module\u0026 module) { std::cout \u003c\u003c module.name() \u003c\u003c std::endl; }); void apply(const NamedModuleApplyFunction \u0026function, const std::string \u0026name_prefix = std::string())# Applies the function to the Module and recursively to every submodule. The function must accept a const std::string\u0026 for the key of the module, and a Module\u0026. The key of the module itself is the empty string. If name_prefix is given, it is prepended to every key as \u003cname_prefix\u003e.\u003ckey\u003e (and just name_prefix for the module itself). .. code-block:: cpp MyModule module; module-\u003eapply([](const std::string\u0026 key, nn::Module\u0026 module) { std::cout \u003c\u003c key \u003c\u003c \": \" \u003c\u003c module.name() \u003c\u003c std::endl; }); void apply(const ConstNamedModuleApplyFunction \u0026function, const std::string \u0026name_prefix = std::string()) const# Applies the function to the Module and recursively to every submodule. The function must accept a const std::string\u0026 for the key of the module, and a const Module\u0026. The key of the module itself is the empty string. If name_prefix is given, it is prepended to every key as \u003cname_prefix\u003e.\u003ckey\u003e (and just name_prefix for the module itself). .. code-block:: cpp MyModule module; module-\u003eapply([](const std::string\u0026 key, const nn::Module\u0026 module) { std::cout \u003c\u003c key \u003c\u003c \": \" \u003c\u003c module.name() \u003c\u003c std::endl; }); void apply(const ModulePointerApplyFunction \u0026function) const# Applies the function to the Module and recursively to every submodule. The function must accept a const std::shared_ptr\u003cModule\u003e\u0026. .. code-block:: cpp MyModule module; module-\u003eapply([](const std::shared_ptr\u003cnn::Module\u003e\u0026 module) { std::cout \u003c\u003c module-\u003ename() \u003c\u003c std::endl; }); void apply(const NamedModulePointerApplyFunction \u0026function, const std::string \u0026name_prefix = std::string()) const# Applies the function to the Module and recursively to every submodule. The function must accept a const std::string\u0026 for the key of the module, and a const std::shared_ptr\u003cModule\u003e\u0026. The key of the module itself is the empty string. If name_prefix is given, it is prepended to every key as \u003cname_prefix\u003e.\u003ckey\u003e (and just name_prefix for the module itself). .. code-block:: cpp MyModule module; module-\u003eapply([](const std::string\u0026 key, const std::shared_ptr\u003cnn::Module\u003e\u0026 module) { std::cout \u003c\u003c key \u003c\u003c \": \" \u003c\u003c module-\u003ename() \u003c\u003c std::endl; }); std::vector\u003cTensor\u003e parameters(bool recurse = true) const# Returns the parameters of this Module and if recurse is true, also recursively of every submodule. OrderedDict\u003cstd::string, Tensor\u003e named_parameters(bool recurse = true) const# Returns an OrderedDict with the parameters of this Module along with their keys, and if recurse is true also recursively of every submodule. std::vector\u003cTensor\u003e buffers(bool recurse = true) const# Returns the buffers of this Module and if recurse is true, also recursively of every submodule. OrderedDict\u003cstd::string, Tensor\u003e named_buffers(bool recurse = true) const# Returns an OrderedDict with the buffers of this Module along with their keys, and if recurse is true also recursively of every submodule. std::vector\u003cstd::shared_ptr\u003cModule\u003e\u003e modules(bool include_self = true) const# Returns the submodules of this Module (the entire submodule hierarchy) and if include_self is true, also inserts a shared_ptr to this module in the first position. .. warning:: Only pass include_self as true if this Module is stored in a shared_ptr! Otherwise an exception will be thrown. You may still call this method with include_self set to false if your Module is not stored in a shared_ptr. OrderedDict\u003cstd::string, std::shared_ptr\u003cModule\u003e\u003e named_modules(const std::string \u0026name_prefix = std::string(), bool include_self = true) const# Returns an OrderedDict of the submodules of this Module (the entire submodule hierarchy) and their keys, and if include_self is true, also inserts a shared_ptr to this module in the first position. If name_prefix is given, it is prepended to every key as \u003cname_prefix\u003e.\u003ckey\u003e (and just name_prefix for the module itself). .. warning:: Only pass include_self as true if this Module is stored in a shared_ptr! Otherwise an exception will be thrown. You may still call this method with include_self set to false if your Module is not stored in a shared_ptr. std::vector\u003cstd::shared_ptr\u003cModule\u003e\u003e children() const# Returns the direct submodules of this Module. OrderedDict\u003cstd::string, std::shared_ptr\u003cModule\u003e\u003e named_children() const# Returns an OrderedDict of the direct submodules of this Module and their keys. virtual void train(bool on = true)# Enables \u201ctraining\u201d mode. void eval()# Calls train(false) to enable \u201ceval\u201d mode. Do not override this method, override train() instead. virtual bool is_training() const noexcept# True if the module is in training mode. Every Module has a boolean associated with it that determines whether the Module is currently in training mode (set via .train()) or in evaluation (inference) mode (set via .eval()). This property is exposed via is_training(), and may be used by the implementation of a concrete module to modify its runtime behavior. See the BatchNorm or Dropout modules for examples of Modules that use different code paths depending on this property. virtual void to(torch::Device device, torch::Dtype dtype, bool non_blocking = false)# Recursively casts all parameters to the given dtype and device. If non_blocking is true and the source is in pinned memory and destination is on the GPU or vice versa, the copy is performed asynchronously with respect to the host. Otherwise, the argument has no effect. virtual void to(torch::Dtype dtype, bool non_blocking = false)# Recursively casts all parameters to the given dtype. If non_blocking is true and the source is in pinned memory and destination is on the GPU or vice versa, the copy is performed asynchronously with respect to the host. Otherwise, the argument has no effect. virtual void to(torch::Device device, bool non_blocking = false)# Recursively moves all parameters to the given device. If non_blocking is true and the source is in pinned memory and destination is on the GPU or vice versa, the copy is performed asynchronously with respect to the host. Otherwise, the argument has no effect. virtual void zero_grad(bool set_to_none = true)# Recursively zeros out the grad value of each registered parameter. template\u003ctypename ModuleType\u003eModuleType::ContainedType *as() noexcept# Attempts to cast this Module to the given ModuleType. This method is useful when calling apply(). .. code-block:: cpp void initialize_weights(nn::Module\u0026 module) { torch::NoGradGuard no_grad; if (auto* linear = module.as\u003cnn::Linear\u003e()) { linear-\u003eweight.normal_(0.0, 0.02); } } MyModule module; module-\u003eapply(initialize_weights); template\u003ctypename ModuleType\u003econst ModuleType::ContainedType *as() const noexcept# Attempts to cast this Module to the given ModuleType. This method is useful when calling apply(). .. code-block:: cpp void initialize_weights(nn::Module\u0026 module) { torch::NoGradGuard no_grad; if (auto* linear = module.as\u003cnn::Linear\u003e()) { linear-\u003eweight.normal_(0.0, 0.02); } } MyModule module; module-\u003eapply(initialize_weights); template\u003ctypename ModuleType, typename = torch::detail::disable_if_module_holder_t\u003cModuleType\u003e\u003eModuleType *as() noexcept# Attempts to cast this Module to the given ModuleType. This method is useful when calling apply(). .. code-block:: cpp void initialize_weights(nn::Module\u0026 module) { torch::NoGradGuard no_grad; if (auto* linear = module.as\u003cnn::Linear\u003e()) { linear-\u003eweight.normal_(0.0, 0.02); } } MyModule module; module.apply(initialize_weights); template\u003ctypename ModuleType, typename = torch::detail::disable_if_module_holder_t\u003cModuleType\u003e\u003econst ModuleType *as() const noexcept# Attempts to cast this Module to the given ModuleType. This method is useful when calling apply(). .. code-block:: cpp void initialize_weights(nn::Module\u0026 module) { torch::NoGradGuard no_grad; if (auto* linear = module.as\u003cnn::Linear\u003e()) { linear-\u003eweight.normal_(0.0, 0.02); } } MyModule module; module.apply(initialize_weights); virtual void save(serialize::OutputArchive \u0026archive) const# Serializes the Module into the given OutputArchive. If the Module contains unserializable submodules (e.g. nn::Functional), those submodules are skipped when serializing. virtual void load(serialize::InputArchive \u0026archive)# Deserializes the Module from the given InputArchive. If the Module contains unserializable submodules (e.g. nn::Functional), we don\u2019t check the existence of those submodules in the InputArchive when deserializing. virtual void pretty_print(std::ostream \u0026stream) const# Streams a pretty representation of the Module into the given stream. By default, this representation will be the name of the module (taken from name()), followed by a recursive pretty print of all of the Module\u2019s submodules. Override this method to change the pretty print. The input stream should be returned from the method, to allow easy chaining. virtual bool is_serializable() const# Returns whether the Module is serializable. Tensor \u0026register_parameter(std::string name, Tensor tensor, bool requires_grad = true)# Registers a parameter with this Module. A parameter should be any gradient-recording tensor used in the implementation of your Module. Registering it makes it available to methods such as parameters(), clone() or to(). Note that registering an undefined Tensor (e.g. module.register_parameter(\"param\", Tensor())) is allowed, and is equivalent to module.register_parameter(\"param\", None) in Python API. .. code-block:: cpp MyModule::MyModule() { weight_ = register_parameter(\"weight\", torch::randn({A, B})); } Tensor \u0026register_buffer(std::string name, Tensor tensor)# Registers a buffer with this Module. A buffer is intended to be state in your module that does not record gradients, such as running statistics. Registering it makes it available to methods such as buffers(), clone() or to(). .. code-block:: cpp MyModule::MyModule() { mean_ = register_buffer(\"mean\", torch::empty({num_features_})); } template\u003ctypename ModuleType\u003estd::shared_ptr\u003cModuleType\u003e register_module(std::string name, std::shared_ptr\u003cModuleType\u003e module)# Registers a submodule with this Module. Registering a module makes it available to methods such as modules(), clone() or to(). .. code-block:: cpp MyModule::MyModule() { submodule_ = register_module(\"linear\", torch::nn::Linear(3, 4)); } template\u003ctypename ModuleType\u003estd::shared_ptr\u003cModuleType\u003e register_module(std::string name, ModuleHolder\u003cModuleType\u003e module_holder)# Registers a submodule with this Module. This method deals with ModuleHolders. Registering a module makes it available to methods such as modules(), clone() or to(). .. code-block:: cpp MyModule::MyModule() { submodule_ = register_module(\"linear\", torch::nn::Linear(3, 4)); } template\u003ctypename ModuleType\u003estd::shared_ptr\u003cModuleType\u003e replace_module(const std::string \u0026name, std::shared_ptr\u003cModuleType\u003e module)# Replaces a registered submodule with this Module. This takes care of the registration, if you used submodule members, you should assign the submodule as well, i.e. use as module-\u003esubmodule_ = module-\u003ereplace_module(\u201clinear\u201d, torch::nn::Linear(3, 4)); It only works when a module of the name is already registered. This is useful for replacing a module after initialization, e.g. for finetuning. template\u003ctypename ModuleType\u003estd::shared_ptr\u003cModuleType\u003e replace_module(const std::string \u0026name, ModuleHolder\u003cModuleType\u003e module_holder)# Replaces a registered submodule with this Module. This method deals with ModuleHolders. This takes care of the registration, if you used submodule members, you should assign the submodule as well, i.e. use as module-\u003esubmodule_ = module-\u003ereplace_module(\u201clinear\u201d, linear_holder); It only works when a module of the name is already registered. This is useful for replacing a module after initialization, e.g. for finetuning. void unregister_module(const std::string \u0026name)# Unregisters a submodule from this Module. If there is no such module with name an exception is thrown. Key features: register_module(): Register submodules for parameter tracking register_parameter(): Register learnable parameters register_buffer(): Register non-learnable state (e.g., running mean) parameters() / named_parameters(): Iterate over all parameters to(): Move module to a device or convert dtype train() / eval(): Toggle training/evaluation mode save() / load(): Serialize and deserialize module state Module Categories# Containers Convolution Layers Pooling Layers Linear Layers Activation Functions Normalization Layers Dropout Layers Embedding Layers Recurrent Layers Transformer Layers Loss Functions Functional API Utilities",
       "author": {
         "@type": "Organization",
         "name": "PyTorch Contributors",
         "url": "https://pytorch.org"
       },
       "image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
       "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "/api/nn/index.html"
       },
       "datePublished": "2023-01-01T00:00:00Z",
       "dateModified": "2023-01-01T00:00:00Z"
     }
 

docsearch:languageen
llm:site-typedocumentation
llm:frameworkPyTorch
llm:descriptionPyTorch C++ neural network modules — torch::nn API for defining and training models.
llm:navigation-filehttps://pytorch.org/docs/stable/llms.txt
llm:sitemaphttps://pytorch.org/docs/stable/sitemap.xml
llm:versionmain
llm:projectPyTorch
llm:page-typedocumentation
og:imagehttps://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png
None2

Links:

Skip to main contenthttps://docs.pytorch.org/cppdocs/api/nn/index.html#main-content
Home https://docs.pytorch.org/cppdocs/index.html
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensor Indexinghttps://docs.pytorch.org/cppdocs/api/aten/indexing.html
Tensor Accessorshttps://docs.pytorch.org/cppdocs/api/aten/accessors.html
C10: Core Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/index.html
Device and DeviceTypehttps://docs.pytorch.org/cppdocs/api/c10/device.html
Device Guardshttps://docs.pytorch.org/cppdocs/api/c10/guards.html
Streamshttps://docs.pytorch.org/cppdocs/api/c10/streams.html
Core Typeshttps://docs.pytorch.org/cppdocs/api/c10/types.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/utilities.html
Autograd: Automatic Differentiationhttps://docs.pytorch.org/cppdocs/api/autograd/index.html
Gradient Computationhttps://docs.pytorch.org/cppdocs/api/autograd/gradient.html
Custom Autograd Functionshttps://docs.pytorch.org/cppdocs/api/autograd/custom_functions.html
Gradient Modeshttps://docs.pytorch.org/cppdocs/api/autograd/modes.html
CUDA Supporthttps://docs.pytorch.org/cppdocs/api/cuda/index.html
CUDA Streamshttps://docs.pytorch.org/cppdocs/api/cuda/streams.html
CUDA Guardshttps://docs.pytorch.org/cppdocs/api/cuda/guards.html
CUDA Utility Functionshttps://docs.pytorch.org/cppdocs/api/cuda/utilities.html
XPU Supporthttps://docs.pytorch.org/cppdocs/api/xpu/index.html
XPU Streamshttps://docs.pytorch.org/cppdocs/api/xpu/streams.html
XPU Utility Functionshttps://docs.pytorch.org/cppdocs/api/xpu/utilities.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
Optimizers (torch::optim)https://docs.pytorch.org/cppdocs/api/optim/index.html
Gradient Descent Optimizershttps://docs.pytorch.org/cppdocs/api/optim/gradient_descent.html
Adaptive Learning Rate Optimizershttps://docs.pytorch.org/cppdocs/api/optim/adaptive.html
Second-Order Optimizershttps://docs.pytorch.org/cppdocs/api/optim/second_order.html
Learning Rate Schedulershttps://docs.pytorch.org/cppdocs/api/optim/schedulers.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
Datasetshttps://docs.pytorch.org/cppdocs/api/data/datasets.html
DataLoaderhttps://docs.pytorch.org/cppdocs/api/data/dataloader.html
Samplershttps://docs.pytorch.org/cppdocs/api/data/samplers.html
Transformshttps://docs.pytorch.org/cppdocs/api/data/transforms.html
Serialization (torch::serialize)https://docs.pytorch.org/cppdocs/api/serialize/index.html
Saving and Loadinghttps://docs.pytorch.org/cppdocs/api/serialize/save_load.html
Archiveshttps://docs.pytorch.org/cppdocs/api/serialize/archives.html
Checkpointshttps://docs.pytorch.org/cppdocs/api/serialize/checkpoints.html
Torch Library APIhttps://docs.pytorch.org/cppdocs/api/library/index.html
Operator Registrationhttps://docs.pytorch.org/cppdocs/api/library/registration.html
Custom Classeshttps://docs.pytorch.org/cppdocs/api/library/custom_classes.html
Library Versioninghttps://docs.pytorch.org/cppdocs/api/library/versioning.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
Library Registration Macroshttps://docs.pytorch.org/cppdocs/api/stable/registration.html
Stable Operatorshttps://docs.pytorch.org/cppdocs/api/stable/operators.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/stable/utilities.html
https://docs.pytorch.org/cppdocs/index.html
C++ API Referencehttps://docs.pytorch.org/cppdocs/api/index.html
#https://docs.pytorch.org/cppdocs/api/nn/index.html#neural-network-modules-torch-nn
#https://docs.pytorch.org/cppdocs/api/nn/index.html#header-files
#https://docs.pytorch.org/cppdocs/api/nn/index.html#module-base-class
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
register_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a505feb18878e17ed60038c4ed87406f5
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Linearhttps://docs.pytorch.org/cppdocs/api/nn/linear.html#PyTorchclasstorch_1_1nn_1_1_linear
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
parameters()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a37b0008259770153722e6ecdb8ffade2
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Module::to()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a50706fc09d79c3af9c7348bd76d7da17
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1afe74ce9f020f9f46527689539b4b4f66
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
torch::nn::Cloneable< SoftshrinkImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< PReLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LogSoftmaxImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< L1LossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SequentialImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< HardshrinkImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< GLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< RReLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ParameterDictImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< IdentityImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< FoldImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< EmbeddingBagImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< BilinearImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TripletMarginWithDistanceLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SoftminImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SmoothL1LossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MultiLabelMarginLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LeakyReLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< FunctionalImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ELUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TanhshrinkImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< PairwiseDistanceImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LogSigmoidImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< HardtanhImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< FractionalMaxPool2dImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< FlattenImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CrossMapLRN2dImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TransformerEncoderLayerImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ThresholdImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SoftsignImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MultiMarginLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< FractionalMaxPool3dImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CTCLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< UnfoldImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SiLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ParameterListImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MultiheadAttentionImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CELUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< UpsampleImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TransformerImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SELUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< PixelUnshuffleImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LinearImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< HingeEmbeddingLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< EmbeddingImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MultiLabelSoftMarginLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CrossEntropyLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TripletMarginLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TransformerDecoderLayerImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SoftMarginLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LocalResponseNormImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< BCELossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< LayerNormImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< AdaptiveLogSoftmaxWithLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ReLUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ModuleListImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< HuberLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< GELUImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SoftmaxImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< Softmax2dImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SoftplusImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< SigmoidImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< PoissonNLLLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ModuleDictImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MishImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< UnflattenImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< ReLU6Impl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MSELossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CosineSimilarityImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< CosineEmbeddingLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TransformerDecoderImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TanhImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< NLLLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< MarginRankingLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< BCEWithLogitsLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< TransformerEncoderImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< PixelShuffleImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< KLDivLossImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< GroupNormImpl >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
torch::nn::Cloneable< Derived >https://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_cloneable
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module19ModuleApplyFunctionE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24ConstModuleApplyFunctionE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24NamedModuleApplyFunctionE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module29ConstNamedModuleApplyFunctionE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module26ModulePointerApplyFunctionE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module31NamedModulePointerApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleENSt6stringE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleEv
name()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a09407fc8e8eca674c18dd4436f1a7ad2
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERK6Module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERK6Module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleaSERK6Module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERR6Module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERR6Module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleaSERR6Module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleD0Ev
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module4nameEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Linearhttps://docs.pytorch.org/cppdocs/api/nn/linear.html#PyTorchclasstorch_1_1nn_1_1_linear
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5cloneERKNSt8optionalI6DeviceEE
ModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module19ModuleApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5applyERK19ModuleApplyFunction
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
ConstModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24ConstModuleApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK24ConstModuleApplyFunction
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
NamedModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24NamedModuleApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5applyERK24NamedModuleApplyFunctionRKNSt6stringE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
ConstNamedModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module29ConstNamedModuleApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK29ConstNamedModuleApplyFunctionRKNSt6stringE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
ModulePointerApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module26ModulePointerApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK26ModulePointerApplyFunction
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
NamedModulePointerApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module31NamedModulePointerApplyFunctionE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK31NamedModulePointerApplyFunctionRKNSt6stringE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module10parametersEb
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#_CPPv4I00EN5torch11OrderedDictE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module16named_parametersEb
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#PyTorchclasstorch_1_1_ordered_dict
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module7buffersEb
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#_CPPv4I00EN5torch11OrderedDictE
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module13named_buffersEb
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#PyTorchclasstorch_1_1_ordered_dict
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module7modulesEb
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#_CPPv4I00EN5torch11OrderedDictE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module13named_modulesERKNSt6stringEb
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#PyTorchclasstorch_1_1_ordered_dict
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module8childrenEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#_CPPv4I00EN5torch11OrderedDictE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module14named_childrenEv
OrderedDicthttps://docs.pytorch.org/cppdocs/api/library/registration.html#PyTorchclasstorch_1_1_ordered_dict
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5trainEb
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module4evalEv
train()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a9d8c5525922794e8ae2ffc0c40372b09
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module11is_trainingEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
train()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a9d8c5525922794e8ae2ffc0c40372b09
eval()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1af0be79d2e17a200b5f69023ba6f02598
is_training()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a1b6cb063bb022e741ce9084ed591ad4f
Dropouthttps://docs.pytorch.org/cppdocs/api/nn/dropout.html#PyTorchclasstorch_1_1nn_1_1_dropout
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch6DeviceEN5torch5DtypeEb
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch5DtypeEb
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch6DeviceEb
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module9zero_gradEb
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module2asEPN10ModuleType13ContainedTypeEv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module2asEPN10ModuleType13ContainedTypeEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a3e7bf8192a37c7e6593b5d1dd5d15903
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0ENK5torch2nn6Module2asEPKN10ModuleType13ContainedTypeEv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0ENK5torch2nn6Module2asEPKN10ModuleType13ContainedTypeEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a3e7bf8192a37c7e6593b5d1dd5d15903
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00EN5torch2nn6Module2asEP10ModuleTypev
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00EN5torch2nn6Module2asEP10ModuleTypev
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00EN5torch2nn6Module2asEP10ModuleTypev
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a3e7bf8192a37c7e6593b5d1dd5d15903
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00ENK5torch2nn6Module2asEPK10ModuleTypev
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00ENK5torch2nn6Module2asEPK10ModuleTypev
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00ENK5torch2nn6Module2asEPK10ModuleTypev
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a3e7bf8192a37c7e6593b5d1dd5d15903
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module4saveERN9serialize13OutputArchiveE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module4loadERN9serialize12InputArchiveE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module12pretty_printERNSt7ostreamE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
name()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a09407fc8e8eca674c18dd4436f1a7ad2
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module15is_serializableEv
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module18register_parameterENSt6stringE6Tensorb
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
parameters()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a37b0008259770153722e6ecdb8ffade2
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1afe74ce9f020f9f46527689539b4b4f66
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a50706fc09d79c3af9c7348bd76d7da17
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module15register_bufferENSt6stringE6Tensor
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
buffers()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a4fcf6732e0780b864678d6adf31ebdd1
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1afe74ce9f020f9f46527689539b4b4f66
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a50706fc09d79c3af9c7348bd76d7da17
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringENSt10shared_ptrI10ModuleTypeEE
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringENSt10shared_ptrI10ModuleTypeEE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringENSt10shared_ptrI10ModuleTypeEE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
modules()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a90792e81478857f8eb3573d6276b5632
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1afe74ce9f020f9f46527689539b4b4f66
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a50706fc09d79c3af9c7348bd76d7da17
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringE12ModuleHolderI10ModuleTypeE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringE12ModuleHolderI10ModuleTypeE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringE12ModuleHolderI10ModuleTypeE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
modules()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a90792e81478857f8eb3573d6276b5632
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1afe74ce9f020f9f46527689539b4b4f66
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module_1a50706fc09d79c3af9c7348bd76d7da17
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringENSt10shared_ptrI10ModuleTypeEE
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringENSt10shared_ptrI10ModuleTypeEE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringENSt10shared_ptrI10ModuleTypeEE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
torch::nn::Linear(3, 4)https://docs.pytorch.org/cppdocs/api/nn/linear.html#PyTorchclasstorch_1_1nn_1_1_linear
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringE12ModuleHolderI10ModuleTypeE
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#_CPPv4I0EN5torch2nn12ModuleHolderE
ModuleTypehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringE12ModuleHolderI10ModuleTypeE
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringE12ModuleHolderI10ModuleTypeE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
ModuleHolderhttps://docs.pytorch.org/cppdocs/api/nn/utilities.html#PyTorchclasstorch_1_1nn_1_1_module_holder
#https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module17unregister_moduleERKNSt6stringE
Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#PyTorchclasstorch_1_1nn_1_1_module
#https://docs.pytorch.org/cppdocs/api/nn/index.html#module-categories
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
previous XPU Utility Functions https://docs.pytorch.org/cppdocs/api/xpu/utilities.html
next Containers https://docs.pytorch.org/cppdocs/api/nn/containers.html
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
previous XPU Utility Functions https://docs.pytorch.org/cppdocs/api/xpu/utilities.html
next Containers https://docs.pytorch.org/cppdocs/api/nn/containers.html
Header Fileshttps://docs.pytorch.org/cppdocs/api/nn/index.html#header-files
Module Base Classhttps://docs.pytorch.org/cppdocs/api/nn/index.html#module-base-class
torch::nn::Modulehttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleE
ModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module19ModuleApplyFunctionE
ConstModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24ConstModuleApplyFunctionE
NamedModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module24NamedModuleApplyFunctionE
ConstNamedModuleApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module29ConstNamedModuleApplyFunctionE
ModulePointerApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module26ModulePointerApplyFunctionE
NamedModulePointerApplyFunctionhttps://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module31NamedModulePointerApplyFunctionE
Module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleENSt6stringE
Module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleEv
Module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERK6Module
operator=()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleaSERK6Module
Module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module6ModuleERR6Module
operator=()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleaSERR6Module
~Module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6ModuleD0Ev
name()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module4nameEv
clone()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5cloneERKNSt8optionalI6DeviceEE
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5applyERK19ModuleApplyFunction
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK24ConstModuleApplyFunction
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5applyERK24NamedModuleApplyFunctionRKNSt6stringE
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK29ConstNamedModuleApplyFunctionRKNSt6stringE
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK26ModulePointerApplyFunction
apply()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module5applyERK31NamedModulePointerApplyFunctionRKNSt6stringE
parameters()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module10parametersEb
named_parameters()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module16named_parametersEb
buffers()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module7buffersEb
named_buffers()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module13named_buffersEb
modules()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module7modulesEb
named_modules()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module13named_modulesERKNSt6stringEb
children()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module8childrenEv
named_children()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module14named_childrenEv
train()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module5trainEb
eval()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module4evalEv
is_training()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module11is_trainingEv
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch6DeviceEN5torch5DtypeEb
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch5DtypeEb
to()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module2toEN5torch6DeviceEb
zero_grad()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module9zero_gradEb
as()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module2asEPN10ModuleType13ContainedTypeEv
as()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0ENK5torch2nn6Module2asEPKN10ModuleType13ContainedTypeEv
as()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00EN5torch2nn6Module2asEP10ModuleTypev
as()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I00ENK5torch2nn6Module2asEPK10ModuleTypev
save()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module4loadERN9serialize12InputArchiveE
pretty_print()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module12pretty_printERNSt7ostreamE
is_serializable()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4NK5torch2nn6Module15is_serializableEv
register_parameter()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module18register_parameterENSt6stringE6Tensorb
register_buffer()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module15register_bufferENSt6stringE6Tensor
register_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringENSt10shared_ptrI10ModuleTypeEE
register_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module15register_moduleENSt10shared_ptrI10ModuleTypeEENSt6stringE12ModuleHolderI10ModuleTypeE
replace_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringENSt10shared_ptrI10ModuleTypeEE
replace_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4I0EN5torch2nn6Module14replace_moduleENSt10shared_ptrI10ModuleTypeEERKNSt6stringE12ModuleHolderI10ModuleTypeE
unregister_module()https://docs.pytorch.org/cppdocs/api/nn/index.html#_CPPv4N5torch2nn6Module17unregister_moduleERKNSt6stringE
Module Categorieshttps://docs.pytorch.org/cppdocs/api/nn/index.html#module-categories
Show Source https://docs.pytorch.org/cppdocs/_sources/api/nn/index.md.txt
ExecuTorchhttps://docs.pytorch.org/executorch
Helionhttps://docs.pytorch.org/helion
torchaohttps://docs.pytorch.org/ao
kinetohttps://github.com/pytorch/kineto
torchtitanhttps://github.com/pytorch/torchtitan
TorchRLhttps://docs.pytorch.org/rl
torchvisionhttps://docs.pytorch.org/vision
torchaudiohttps://docs.pytorch.org/audio
tensordicthttps://docs.pytorch.org/tensordict
PyTorch on XLA Deviceshttps://docs.pytorch.org/xla
View Docshttps://docs.pytorch.org/docs/stable/index.html
View Tutorialshttps://docs.pytorch.org/tutorials
View Resourceshttps://pytorch.org/resources
Privacy Policyhttps://www.linuxfoundation.org/privacy/
https://www.facebook.com/pytorch
https://twitter.com/pytorch
https://www.youtube.com/pytorch
https://www.linkedin.com/company/pytorch
https://pytorch.slack.com
https://pytorch.org/wechat
Policieshttps://www.linuxfoundation.org/legal/policies
Trademark Usagehttps://www.linuxfoundation.org/trademark-usage
Privacy Policyhttp://www.linuxfoundation.org/privacy
Cookies Policyhttps://opensource.fb.com/legal/cookie-policy
Sphinxhttps://www.sphinx-doc.org/
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.