Returns an OrderedDict with the parameters of this Module along with their keys, and if recurse is true also recursively of every submodule. Named_parameters (bool recurse=true) const Returns the parameters of this Module and if recurse is true, also recursively of every submodule. More.Īpply (const ConstModuleApplyFunction &function) constĪpply (const NamedModuleApplyFunction &function, const std::string &name_prefix=std::string())Īpply (const ConstNamedModuleApplyFunction &function, const std::string &name_prefix=std::string()) constĪpply (const ModulePointerApplyFunction &function) constĪpply (const NamedModulePointerApplyFunction &function, const std::string &name_prefix=std::string()) const More.Īpply (const ModuleApplyFunction &function)Īpplies the function to the Module and recursively to every submodule. ![]() Tells the base Module about the name of the submodule.Ĭonstructs the module without immediate knowledge of the submodule's name. Public Member Functions inherited from torch::nn::Module Performs a recursive "deep copy" of the Module, such that all parameters and submodules in the cloned module are different from those in the original module. Public Member Functions inherited from torch::nn::Cloneable True if there are no modules in the Sequential. The current size of the Sequential container. More.Īttempts to return a std::shared_ptr whose type is the one provided. More.Īttempts to return a std::shared_ptr whose dynamic type is that of the underlying module at the given index. Returns a const iterator to the end of the Sequential.Īttempts to return the module at the given index as the requested type. Returns an iterator to the end of the Sequential. ![]() Returns a const iterator to the start of the Sequential. Returns an iterator to the start of the Sequential. Iterates over the container and calls push_back() on each value. Unwraps the contained module of a ModuleHolder and adds it to the Sequential. Push_back (const ModuleHolder &module_holder) ![]() More.Īdds a new (boxed) Module to the Sequential container.Īdds a new Module to the Sequential container, moving or copying it into a shared_ptr internally. Pretty prints the Sequential module into the given stream.įeeds inputs to the first module and then chains outputs to inputs, returning the last output. Pretty_print (std::ostream &stream) const override Reset() is empty for Sequential, since it does not have parameters of its own. Special cloning function for Sequential because it does not use reset(). NamedModulePointerApplyFunction = std::function &)>Ĭonstructs the Sequential from a variadic list of modules.Ĭlone (const optional &device=nullopt) const override ModulePointerApplyFunction = std::function &)> Public Types inherited from torch::nn::ModuleĬonstNamedModuleApplyFunction = std::function ConstIterator = std::vector::const_iterator
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |