Class Sequential¶
Defined in File sequential.h
Page Contents
Inheritance Relationships¶
Base Type¶
public torch::nn::ModuleHolder< SequentialImpl >
(Template Class ModuleHolder)
Class Documentation¶
-
class Sequential : public torch::nn::ModuleHolder<SequentialImpl>¶
A
ModuleHolder
subclass forSequentialImpl
.See the documentation for
SequentialImpl
class to learn what methods it provides, or the documentation forModuleHolder
to learn about PyTorch’s module storage semantics.Public Functions
-
inline Sequential()¶
-
inline Sequential(std::initializer_list<NamedAnyModule> named_modules)¶
Constructs the
Sequential
from a braced-init-list of namedAnyModule
s.It enables the following use case:
Sequential sequential({{"m1", M(1)}, {"m2", M(2)}})
-
inline Sequential()¶