Caffe2 - Python API
A deep learning, cross platform ML framework
Functions
dyndep Namespace Reference

Module caffe2.python.dyndep. More...

Functions

def InitOpsLibrary (name)
 
def GetImportedOpsLibraries ()
 

Detailed Description

Module caffe2.python.dyndep.

Function Documentation

◆ InitOpsLibrary()

def dyndep.InitOpsLibrary (   name)
Loads a dynamic library that contains custom operators into Caffe2.

Since Caffe2 uses static variable registration, you can optionally load a
separate .so file that contains custom operators and registers that into
the caffe2 core binary. In C++, this is usually done by either declaring
dependency during compilation time, or via dynload. This allows us to do
registration similarly on the Python side.

Args:
    name: a name that ends in .so, such as "my_custom_op.so". Otherwise,
        the command will simply be ignored.
Returns:
    None

Definition at line 14 of file dyndep.py.