1

Im trying to quantize my model using vitis-ai tensoflow in the vitis ai docker image.But an error occurs sating my input node is wrong.I checked my input node via displaying using netron,but it is the only input node.why does this occur?

Quantization code is below.

MODEL_PATH='./trained_models/saved_model'
FROZEN_GRAPH='${MODEL_PATH}/frozen_graph.pb'
INPUT_NODES="input_1"
OUTPUT_NODES='unknown_134'
OUTPUT_DIR="./quantize_result"


vai_q_tensorflow quantize \
    --input_frozen_graph ${FROZEN_GRAPH} \
    --input_nodes ${INPUT_NODES} \
    --input_shapes ?,256,512,3 \
    --output_nodes ${OUTPUT_NODES} \
    --input_fn graph_input_fn.input_fn\
    --method 1 \
    --weight_bit 8 \
    --activation_bit 8 \
    --calib_iter 5\
    --simulate_dpu 1 \
    --output_dir ${OUTPUT_DIR} \
    --dump_float 0

Input node='input_1'(according to netron) error saying input_1 not found for frozen graph.

  • 1
    done.thanks for your suggestions. – Kevini Perera Jul 03 '23 at 13:17
  • Okay, I might be completely mistaken; I honestly have no clue about vitis-ai. I do know Bash, however. Could you print `FROZEN_GRAPH`? In Bash, there's no variable expansion within *single quotes*. You would have to use double quotes instead: `FROZEN_GRAPH="${MODEL_PATH}/frozen_graph.pb"`. – Friedrich Jul 03 '23 at 13:36

0 Answers0