3 releases
0.1.5-alpha.0 | Mar 25, 2023 |
---|---|
0.1.4-alpha.0 | Mar 3, 2023 |
0.1.3-alpha.0 | Mar 1, 2023 |
#2 in #caffe2
710KB
5K
SLoC
caffe2-module
Crate in the process of being translated from C++ to Rust. Some function bodies may still be undergoing translation.
ModuleSchema
This type represents the schema of a Caffe2 module. A module is a collection of operators and associated state that can be run as a single unit. The schema of a module defines the inputs and outputs of the module, as well as any associated parameters or attributes.
current_module_handles
current_modules
g_module_change_mutex
has_module
load_module
mutable_current_modules
These functions and variables are used to manage
the state of Caffe2
modules. current_module_handles
and
current_modules
provide access to the current
modules and their handles,
respectively. g_module_change_mutex
is a mutex
used to synchronize access to the current module
state. has_module
checks if a module is
currently loaded, while load_module
loads
a module into the current module
state. mutable_current_modules
provides
a mutable reference to the current module state,
which can be used to modify the state of the
loaded modules.
Caffe2ModuleTestStaticDummyOp
This type represents a dummy operator used for testing Caffe2 modules. The operator does not perform any computation and is used only to test the loading and running of Caffe2 modules.
caffe2_module
module_test_dynamic_module
module_test_static_module
These types represent Caffe2 modules used for
testing and validation. caffe2_module
is a macro
used to define a new Caffe2 module, while
module_test_dynamic_module
and
module_test_static_module
are specific modules
used for testing and validation.
register_cpu_operator
This function registers a new CPU operator with Caffe2. An operator is a function that performs a specific computation, such as a convolution or a matrix multiplication. Registering a new operator with Caffe2 allows it to be used in Caffe2 modules and networks.
run
This function runs a Caffe2 module. Running a module executes all the operators in the module in the correct order, with the appropriate inputs and parameters.
typename
This function returns the name of the type of a given value. It is used to provide type information for Caffe2 modules and operators.
In summary, caffe2-module
is a Rust crate that
provides functions and types for managing and
running Caffe2 modules. Caffe2 modules are
collections of operators and associated state that
can be run as a single unit, and are used in deep
learning for tasks such as training and
inference. The crate provides functions for
loading and managing modules, as well as for
registering new operators with Caffe2. The crate
is still in the process of being translated from
C++ to Rust, but many of the core functions are
already available.
Dependencies
~36MB
~404K SLoC