Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Protected Member Functions | Protected Attributes
caffe2::NetBase Class Referenceabstract
Inheritance diagram for caffe2::NetBase:
caffe2::DAGNetBase caffe2::SimpleNet caffe2::AsyncDAGNet caffe2::DAGNet

Public Member Functions

 NetBase (const NetDef &net_def, Workspace *ws)
 
virtual bool Run ()=0
 
virtual bool RunAsync ()
 
virtual vector< float > TEST_Benchmark (const int warmup_runs, const int main_runs, const bool run_individual)
 Benchmarks a network. More...
 
const vector< string > & external_output () const
 
const vector< string > & external_input () const
 

Protected Member Functions

 DISABLE_COPY_AND_ASSIGN (NetBase)
 

Protected Attributes

vector< string > external_input_
 
vector< string > external_output_
 
string name_
 

Detailed Description

Definition at line 29 of file net.h.

Member Function Documentation

◆ TEST_Benchmark()

virtual vector<float> caffe2::NetBase::TEST_Benchmark ( const int  warmup_runs,
const int  main_runs,
const bool  run_individual 
)
inlinevirtual

Benchmarks a network.

This function returns a vector of float recording the number of milli- seconds spent during the benchmark. The 0-th item is the time spent per each network run, and if a net instantiation supports run_individual, the remainder of the vector returns the number of milliseconds spent per opeartor.

Reimplemented in caffe2::DAGNetBase, and caffe2::SimpleNet.

Definition at line 49 of file net.h.


The documentation for this class was generated from the following files: