• []how to use caffe model with TensorRT c++


    //IHostMemory *gieModelStream {nullptr};
        //const char* prototxt = "./googlenet/test_20181010.prototxt";//argv[1];
        //const char* caffemodel = "./googlenet/lane_area_lx1890_iter_320000_20181010.caffemodel";//argv[2];
        //std::vector<std::string> output_blobnames;
        //output_blobnames.push_back(OUTPUT_BLOB_NAME_1);
        //output_blobnames.push_back(OUTPUT_BLOB_NAME_2);
        //caffeToGIEModel(prototxt, caffemodel, output_blobnames, 1, &plugin_factory, gieModelStream, true);
        //caffeToGIEModel_serialize(prototxt, caffemodel, output_blobnames, 1, &plugin_factory, gieModelStream, true, s);
        plugin_factory.destroyPlugin();
        //std::vector<std::string>().swap(output_blobnames);
        // deserialize the engine
        IRuntime* runtime = createInferRuntime(gLogger);
        //ICudaEngine* engine = runtime->deserializeCudaEngine(gieModelStream->data(), gieModelStream->size(), &plugin_factory);
        ICudaEngine* engine = runtime->deserializeCudaEngine(ss.data(), ss.size(), &plugin_factory);
        //if (gieModelStream)
            //gieModelStream->destroy();
        IExecutionContext *context = engine->createExecutionContext();
  • 相关阅读:
    MapServer:地图发布工具
    hdu1054(二分图匹配)
    hdu 5091(线段树+扫描线)
    hdu1828(线段树+扫描线)
    hdu2847(暴力)
    hdu1052(田忌赛马 贪心)
    hdu1051(LIS | Dilworth定理)
    hdu1050(贪心)
    poj 2773(容斥原理)
    hdu 1044(bfs+状压)
  • 原文地址:https://www.cnblogs.com/happyamyhope/p/10931449.html
Copyright © 2020-2023  润新知