MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / parse

Method parse

parsers/caffe/caffeParser/caffeParser.cpp:346–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346const IBlobNameToTensor* CaffeParser::parse(const char* deployFile,
347 const char* modelFile,
348 INetworkDefinition& network,
349 DataType weightType) noexcept
350{
351 CHECK_NULL_RET_NULL(deployFile)
352
353 // this is used to deal with dropout layers which have different input and output
354 mModel = std::unique_ptr<trtcaffe::NetParameter>(new trtcaffe::NetParameter);
355 if (modelFile && !readBinaryProto(mModel.get(), modelFile, mProtobufBufferSize))
356 {
357 RETURN_AND_LOG_ERROR(nullptr, "Could not parse model file");
358 }
359
360 mDeploy = std::unique_ptr<trtcaffe::NetParameter>(new trtcaffe::NetParameter);
361 if (!readTextProto(mDeploy.get(), deployFile))
362 {
363 RETURN_AND_LOG_ERROR(nullptr, "Could not parse deploy file");
364 }
365
366 return parse(network, weightType, modelFile != nullptr);
367}
368
369const IBlobNameToTensor* CaffeParser::parse(INetworkDefinition& network,
370 DataType weightType,

Callers 2

__call__Method · 0.95
pyOnnx.cppFile · 0.45

Calls 15

readBinaryProtoFunction · 0.85
readTextProtoFunction · 0.85
minFunction · 0.85
c_strMethod · 0.80
layerMethod · 0.80
isNetworkInputMethod · 0.80
nameMethod · 0.80
addPluginV2Method · 0.80
shapeMethod · 0.80
setTensorNamesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected