Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
caffe2::ArgumentHelper Class Reference

A helper class to index into arguments. More...

#include <proto_utils.h>

Public Member Functions

 ArgumentHelper (const OperatorDef &def)
 
 ArgumentHelper (const NetDef &netdef)
 
bool HasArgument (const string &name) const
 
template<typename T >
GetSingleArgument (const string &name, const T &default_value) const
 
template<typename T >
bool HasSingleArgumentOfType (const string &name) const
 
template<typename T >
vector< T > GetRepeatedArgument (const string &name, const std::vector< T > &default_value=std::vector< T >()) const
 
template<typename MessageType >
MessageType GetMessageArgument (const string &name) const
 
template<typename MessageType >
vector< MessageType > GetRepeatedMessageArgument (const string &name) const
 

Detailed Description

A helper class to index into arguments.

This helper helps us to more easily index into a set of arguments that are present in the operator. To save memory, the argument helper does not copy the operator def, so one would need to make sure that the lifetime of the OperatorDef object outlives that of the ArgumentHelper.

Definition at line 174 of file proto_utils.h.


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