Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

change input size error

ren__nannan
Beginner
394 Views

Hi: 

use "Intel\computer_vision_sdk_2018.3.343\deployment_tools\intel_models\head-pose-estimation-adas-0001\FP32\head-pose-estimation-adas-0001.xml"  or " Intel\computer_vision_sdk_2018.3.343\deployment_tools\intel_models\license-plate-recognition-barrier-0001\FP32\license-plate-recognition-barrier-0001.xml", if I  change input size like this:

    SizeVector input_dims = inputInfoFirst->getInputData()->getTensorDesc().getDims();
    input_dims[2] = config_.input_h;
    input_dims[3] = config_.input_w;
    std::map<std::string, SizeVector> input_shapes;
    input_shapes[inputInfo.begin()->first] = input_dims;
    net_reader.getNetwork().reshape(input_shapes);

 

run "net_ = config_.plugin.LoadNetwork(net_reader.getNetwork(), {});" will report error in the "extract_exception".

 

0 Kudos
1 Reply
Nikolay_L_Intel1
Employee
394 Views

Hi!

These models have Fully Connected layer that by definition can't be resized: weights are fixed and rigidly correspond to the input size.

Have you tried to catch exception and to print error message? In your particular case, you should get the following explanation of the failure:

Failed to infer shapes for FullyConnected layer with error: New shapes [1,71,120,494] make Kernels(120x494), Channels(71), Output depth(128), Groups(1) not matching weights size: 799744

Best regards,
Nikolai 

0 Kudos
Reply