Rate this Page

Define TORCH_MODULE_IMPL#

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 from nn::ModuleHolder to provide a wrapper over a std::shared_ptr<ImplType>.

Impl is a type alias for ImplType which provides a way to call static method of ImplType.