20.02
|
Caffe networks are loaded from protobuf files (binary or text) using the protobuf library and the generated code from caffe.pb.h. More...
Classes | |
class | CaffeParser |
class | CaffeParserBase |
class | ICaffeParser |
class | RecordByRecordCaffeParser |
Typedefs | |
using | BindingPointInfo = armnn::BindingPointInfo |
using | ICaffeParserPtr = std::unique_ptr< ICaffeParser, void(*)(ICaffeParser *parser)> |
Functions | |
BlobShape | TensorDescToBlobShape (const TensorInfo &desc) |
Caffe networks are loaded from protobuf files (binary or text) using the protobuf library and the generated code from caffe.pb.h.
This gives us a caffe::NetParameter which is an in-memory version of the file. This contains a flat list of Caffe 'layers' (e.g. convolution, pooling etc.). Each layer has inputs (called "bottoms") and outputs (called "tops"). Data flows from bottom to top. The bottoms of a layer refer to the tops of other layers, not their names. The names of layers seem to be arbitrary (you could rename a layer and the network wouldn't need any other changes).
Some layers (e.g. Relu) can be configured so that their top and bottom are both the same. This is called an "in-place" layer and is a Caffe runtime feature used to reduce memory usage by modifying tensors in-place. This isn't relevant to the parser and so we preprocess these layers to convert them to regular layers, to result in a consistent graph structure.
Definition at line 19 of file ICaffeParser.hpp.
using ICaffeParserPtr = std::unique_ptr<ICaffeParser, void(*)(ICaffeParser* parser)> |
Definition at line 22 of file ICaffeParser.hpp.
BlobShape armnnCaffeParser::TensorDescToBlobShape | ( | const TensorInfo & | desc | ) |
Definition at line 325 of file CaffeParser.cpp.
References TensorInfo::GetNumDimensions(), and TensorInfo::GetShape().
Referenced by CaffeParserBase::AddConvLayerWithDepthwiseConv(), CaffeParserBase::AddConvLayerWithSplits(), and CaffeParserBase::ParseConvLayer().