![]() Void push_back ( const ModuleHolder & module_holder ) ¶ This method allows passing value types, and letting the container deal with the boxing. Void push_back (std::string name, M & module ) ¶Īdds a new named Module to the Sequential container, moving or copying it into a shared_ptr internally. This means you can write Sequential(Module(3, 4)) instead of Sequential (std::make_shared(3, 4)). template>Īdds a new Module to the Sequential container, moving or copying it into a shared_ptr internally. Void push_back (std::string name, std::shared_ptr module_ptr ) ¶Īdds a new named (boxed) Module to the Sequential container. Void push_back (std::shared_ptr module_ptr ) ¶Īdds a new (boxed) Module to the Sequential container. Torch :: Tensor tensor = sequential1 -> forward ( inputs ) int integer = sequential2 -> forward ( inputs ) float value = sequential3 -> forward ( inputs ) template inputs ) ¶įeeds inputs to the first module and then chains outputs to inputs, returning the last output.Ĭonceptually the following loop in Python: Pretty prints the Sequential module into the given stream. void 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(). It enables the following use case: Sequential sequential() std::shared_ptr clone ( const optional & device = nullopt ) const override ¶ ![]() SequentialImpl (std::initializer_list named_modules ) ¶Ĭonstructs the Sequential from a braced-init-list of named AnyModules. SequentialImpl (torch:: OrderedDict & ordered_dict ) ¶Ĭonstructs the Sequential from an OrderedDict of named AnyModules. modules ) ¶Ĭonstructs the Sequential from a variadic list of modules. Public Functions SequentialImpl ( ) = default ¶
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |