Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎10-23-2019

vai_c_tensorflow doesn't generate output files



I'm trying to get a simple fully connected model to work on the Alveo u250. I'm using the docker container and up until the AI Compiler everything is alright but when I try to use the compiler with :

vai_c_tensorflow -f deploy_model.pb -a /opt/vitis_ai/compiler/arch/dpuv1/ALVEO/ALVEO.json -o output

I get that:

Thank you, we wrote the deephi quantization file output/deploy_fix.txt
Traceback (most recent call last):
  File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/bin/vai_c_tensorflow", line 189, in <module>
  File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/bin/vai_c_tensorflow", line 156, in compile
    os.rename(DIR+weight,    DIR+'weights.h5'    )
FileNotFoundError: [Errno 2] No such file or directory: 'output/deploy_model.pb_data.h5' -> 'output/weights.h5'

I checked that none of the compiler output files were generated.

I'm not sure I want (or have the time) to look in the source code for the problem so if anyone has an inkling of a solution it would help a lot.


Best regards


Edit :

Quick update : if I try to add options to the command :

vai_c_tensorflow -f deploy_model.pb -a /opt/vitis_ai/compiler/arch/dpuv1/ALVEO/ALVEO.json -o output --options "{'placeholdershape': {'images_in' : [1,128,128,3]}, 'startnode':'images_in', 'finalnode':'Prediction/dense/BiasAdd'}"

I end up with this :

ValueError: NodeDef mentions attr 'opos' not in Op<name=Placeholder; signature= -> output:dtype; attr=dtype:type; attr=shape:shape,default=<unknown>>; NodeDef: {{node images_in}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).

And I don't know what to make of it. Also I don't get what a "quantization file" is ? (At this point I'm almost sure I don't know what I'm doing...) I think the problem lies either in the model or in a function of tensorflow (tf.graph_util.import_graph_def)

0 Kudos
1 Reply
Registered: ‎03-27-2013

Hi @ts_kiyoha ,


Where did you find these commands?

For U250 you should follow the DPUCADX8G flow like below:


Best Regards,
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos