Define TORCH_MODULE_IMPL#
Defined in File pimpl.h
Define Documentation#
-
TORCH_MODULE_IMPL(Name, ImplType) class Name : public torch::nn::ModuleHolder
<ImplType> { /* NOLINT */ \
public: \
using
torch::nn::ModuleHolder<ImplType>::ModuleHolder; \
using Impl
TORCH_UNUSED_EXCEPT_CUDA= ImplType; \
}
# Defines a class
Name
which inherits fromnn::ModuleHolder
to provide a wrapper over astd::shared_ptr<ImplType>
.Impl
is a type alias forImplType
which provides a way to call static method ofImplType
.