1 #include "caffe2/opt/optimizer.h" 3 #include "caffe2/opt/converter.h" 4 #include "caffe2/opt/mobile.h" 5 #include "caffe2/opt/fusion.h" 13 opt::fuseConvBN(nn, ws);
24 opt::addNNPACK(nn,
false);
25 opt::fuseNNPACKConvRelu(nn);
33 NetDef optimize(NetDef net, Workspace* ws,
int level) {
35 graphOptimzations(&nn, level);
36 workspaceOptimizations(&nn, ws, level);
37 return convertToCaffe2Proto(nn, net);
40 NetDef optimize(NetDef net,
int level) {
42 graphOptimzations(&nn, level);
43 return convertToCaffe2Proto(nn, net);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
repr::NNModule convertToNNModule(const caffe2::NetDef &net, bool strict, std::vector< repr::NNGraph::NodeRef > *opNodeVec)
Ingest a caffe2 protobuf model and output an NNModule.