Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
torch::jit::RegisterOperators Struct Reference

Registration class for new operators. More...

#include <custom_operator.h>

Public Member Functions

 RegisterOperators (std::vector< Operator > operators)
 Registers a vector of already created Operators.
 
template<typename Implementation >
 RegisterOperators (const std::string &name, Implementation &&implementation)
 Calls op(...) with the given operator name and implementation.
 
template<typename Implementation >
RegisterOperatorsop (const std::string &name, Implementation &&implementation)
 Creates a new operator from a name and implementation function (function pointer or function object/lambda) using torch::jit::createOperator, and then registers the operator. More...
 

Detailed Description

Registration class for new operators.

Effectively calls torch::jit::registerOperator for every supplied operator, but allows doing so in the global scope when a RegisterOperators object is assigned to a static variable. Also handles registration of user-defined, "custom" operators.

Definition at line 266 of file custom_operator.h.

Member Function Documentation

template<typename Implementation >
RegisterOperators& torch::jit::RegisterOperators::op ( const std::string &  name,
Implementation &&  implementation 
)
inline

Creates a new operator from a name and implementation function (function pointer or function object/lambda) using torch::jit::createOperator, and then registers the operator.

Definition at line 286 of file custom_operator.h.


The documentation for this struct was generated from the following file: