# Error during the compilation of a neural network in Vitis AI, "Not found op in super_const_dict: name: Decoder_Section_1_UpConv_1/kernel"

I'm following a Xilinx Tutorial about the implementation of a Neural Network in a System on Chip (ARM Processor + Xilinx FPGA) and I have come up with an error during the compilation step.

I've trained a U-Net in Matlab 2020b and exported to Keras via onnx2keras and followed the steps of the tutorial without any errors:

• Verification of getting the same test scores in Matlab and in Vitis AI (correct exportation).
• Transformation of the Keras model into TF checkpoint and inference graph.
• Freezing the TF graph.
• Quantization from 32-bit floating point to 8-bit fixed point.
• Running the compiler (Error while parsing raw model).

The full error message is:

 Traceback (most recent call last):

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/bin/xnnc-run", line 33, in module

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/__main__.py", line 49, in main
runner.normal_run(args)

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/runner.py", line 123, in normal_run
target=target,

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/xconverter.py", line 145, in run
model_files, model_type, _layout, in_shapes, batchsize

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/core.py", line 123, in make_xmodel
model_type=model_t,

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/translator/tensorflow_translator.py", line 107, in to_xmodel
model_type,

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/translator/tensorflow_translator.py", line 173, in create_xmodel
name, layers, layout, in_shapes, batchsize

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/translator/tensorflow_translator.py", line 289, in __create_xmodel_from_tf1
batchsize,

File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/xnnc/translator/tensorflow_translator.py", line 3192, in __generate_xmodel


At first, I thought that the compiler may not support certain layers such as Conv2DTransposed (a way of upsampling images) but even though the documentation says that the Tensorflow version needs to be higher than 2.0 and I'm using 1.15.2, the tutorial includes a U-Net made of those layers and I've compiled it without any problem so, that's not the problem, I think.

Then, I've decided to compare both neural networks after freezing and also after quantization, so as to try to find some information that may be missing in my U-Net that does include it the other one.

Inspection results after freezing. Op types used (my U-Net --> tutorial U-Net):

• Const 78 --> 52
• Identity 28 --> 26
• LeakyRelu 12 --> ---
• Relu -- --> 11
• Conv2D 11 --> 11
• Sub 8 --> ---
• StridedSlice 6 --> 6
• Mul 4 --> 4
• ConcatV2 2 --> 2
• Conv2DBackpropInput 2 --> 2
• MaxPool 2 --> 2
• Pack 2 --> 2
• Shape 2 --> 2
• Placeholder 1 --> 1

There are differences between the two freezing processes as the two U-Nets are two different modified versions of the original one. However, as I see it, I don't think that LeakyRelu, Pad, AddV2 or Sub (the ones that appear in my model and not in the model of the tutorial) are related to the error.

Similarly, after quantization these are the differences. Op types used (my U-Net --> tutorial U-Net):

• Const 78 --> 52
• FixNeuron 48 --> 44
• LeakyRelu 12 --> --
• Relu -- --> 11
• Convd2D 11 --> 11
• Sub 8 --> --
• StridedSlice 6 --> 6
• Mul 4 --> 4
• ConcatV2 2 --> 2
• Conv2DBackpropInput 2 --> 2
• MaxPool 2 --> 2
• Pack 2 --> 2
• Shape 2 --> 2
• Placeholder 1 --> 1

I don't know exactly where the error comes from so any kind of help would be highly appreciated.