How to get weights in a Tensor?

  1. Tensorflow Pretrained model
  2. After parsed a .pb model to uff format
  3. How can I get weights in a tensor ? like output tensor
IBuilder* builder = createInferBuilder(gLogger);
    INetworkDefinition* network = builder->createNetwork();

#if 1
    if (!parser->parse(uffFile, *network, nvinfer1::DataType::kFLOAT))
        RETURN_AND_LOG(nullptr, ERROR, "Fail to parse");
#else
    if (!parser->parse(uffFile, *network, nvinfer1::DataType::kHALF))
        RETURN_AND_LOG(nullptr, ERROR, "Fail to parse");
    builder->setFp16Mode(true);
#endif
    // print some information
    auto output_tensor = network->getOutput(0);
    std::cout << "Tensor name " << output_tensor->getName() << std::endl;
<b>    //Actually , I wonna get ouput weights here , is that possible?</b>

Hello,

As far as I know, I don’t think iTensor class has weight info.

Hi,

Have you got weights data successfully? I need to get some layer’s weights data in my Caffe model too

Thanks