Hi,
I am trying to convert a .pb model to TAO (The official ReID model from DeepSORT, mars-small128.pb).
In order to do so I had to first used a script to convert from .pb to ONNX (GitHub - onnx/tensorflow-onnx: Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX).
python -m tf2onnx.convert --input mars-small128.pb --inputs images:0[0,128,64,3] --outputs features:0 --output mars-small128.onnx --opset 13
Then, I tried to convert mars-small128.onnx to TAO using BYOM, I’ve encountered some errors saying the Less and Loop nodes were not implemented. Therefore, I’ve modified the .pb version before the ONNX conversion to remove those nodes and ended up with a new ONNX model.
Now all the nodes are supported and I can visualise the graph with Netron, everything looks good to me. But I am encountering the following errors when running BYOM:
tao_byom -m mars-small128.onnx -k nvidia_tao -r . -n resnet --verbose
DEBUG: List input shapes:
DEBUG: None
DEBUG: List inputs:
DEBUG: Input 0 -> images:0.
DEBUG: List outputs:
DEBUG: Output 0 -> features:0.
DEBUG: Gathering weights to dictionary.
DEBUG: Replaced name fc1/weights/read:0 to fc1/weights/read.0
DEBUG: Replaced name fc1/weights/read.0 to fc1.weights.read.0
DEBUG: Found weight fc1.weights.read.0 with shape (16384, 128).
DEBUG: Replaced name fc1/fc1/bn/moving_variance/read:0 to fc1/fc1/bn/moving_variance/read.0
DEBUG: Replaced name fc1/fc1/bn/moving_variance/read.0 to fc1.fc1.bn.moving_variance.read.0
DEBUG: Found weight fc1.fc1.bn.moving_variance.read.0 with shape (128,).
DEBUG: Replaced name fc1/fc1/bn/moving_mean/read:0 to fc1/fc1/bn/moving_mean/read.0
DEBUG: Replaced name fc1/fc1/bn/moving_mean/read.0 to fc1.fc1.bn.moving_mean.read.0
DEBUG: Found weight fc1.fc1.bn.moving_mean.read.0 with shape (128,).
DEBUG: Replaced name fc1/fc1/bn/beta/read:0 to fc1/fc1/bn/beta/read.0
DEBUG: Replaced name fc1/fc1/bn/beta/read.0 to fc1.fc1.bn.beta.read.0
DEBUG: Found weight fc1.fc1.bn.beta.read.0 with shape (128,).
DEBUG: Replaced name fc1/fc1/bn/Reshape/shape:0 to fc1/fc1/bn/Reshape/shape.0
DEBUG: Replaced name fc1/fc1/bn/Reshape/shape.0 to fc1.fc1.bn.Reshape.shape.0
DEBUG: Found weight fc1.fc1.bn.Reshape.shape.0 with shape (4,).
DEBUG: Replaced name fc1/fc1/bn/Const:0 to fc1/fc1/bn/Const.0
DEBUG: Replaced name fc1/fc1/bn/Const.0 to fc1.fc1.bn.Const.0
DEBUG: Found weight fc1.fc1.bn.Const.0 with shape (128,).
DEBUG: Replaced name conv4_3/bn/moving_variance/read:0 to conv4_3/bn/moving_variance/read.0
DEBUG: Replaced name conv4_3/bn/moving_variance/read.0 to conv4_3.bn.moving_variance.read.0
DEBUG: Found weight conv4_3.bn.moving_variance.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/bn/moving_mean/read:0 to conv4_3/bn/moving_mean/read.0
DEBUG: Replaced name conv4_3/bn/moving_mean/read.0 to conv4_3.bn.moving_mean.read.0
DEBUG: Found weight conv4_3.bn.moving_mean.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/bn/beta/read:0 to conv4_3/bn/beta/read.0
DEBUG: Replaced name conv4_3/bn/beta/read.0 to conv4_3.bn.beta.read.0
DEBUG: Found weight conv4_3.bn.beta.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/bn/Const:0 to conv4_3/bn/Const.0
DEBUG: Replaced name conv4_3/bn/Const.0 to conv4_3.bn.Const.0
DEBUG: Found weight conv4_3.bn.Const.0 with shape (128,).
DEBUG: Replaced name conv4_3/2/weights/read:0 to conv4_3/2/weights/read.0
DEBUG: Replaced name conv4_3/2/weights/read.0 to conv4_3.2.weights.read.0
DEBUG: Found weight conv4_3.2.weights.read.0 with shape (128, 128, 3, 3).
DEBUG: Replaced name conv4_3/2/biases/read:0 to conv4_3/2/biases/read.0
DEBUG: Replaced name conv4_3/2/biases/read.0 to conv4_3.2.biases.read.0
DEBUG: Found weight conv4_3.2.biases.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/1/weights/read:0 to conv4_3/1/weights/read.0
DEBUG: Replaced name conv4_3/1/weights/read.0 to conv4_3.1.weights.read.0
DEBUG: Found weight conv4_3.1.weights.read.0 with shape (128, 128, 3, 3).
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/moving_variance/read:0 to conv4_3/1/conv4_3/1/bn/moving_variance/read.0
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/moving_variance/read.0 to conv4_3.1.conv4_3.1.bn.moving_variance.read.0
DEBUG: Found weight conv4_3.1.conv4_3.1.bn.moving_variance.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/moving_mean/read:0 to conv4_3/1/conv4_3/1/bn/moving_mean/read.0
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/moving_mean/read.0 to conv4_3.1.conv4_3.1.bn.moving_mean.read.0
DEBUG: Found weight conv4_3.1.conv4_3.1.bn.moving_mean.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/beta/read:0 to conv4_3/1/conv4_3/1/bn/beta/read.0
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/beta/read.0 to conv4_3.1.conv4_3.1.bn.beta.read.0
DEBUG: Found weight conv4_3.1.conv4_3.1.bn.beta.read.0 with shape (128,).
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/Const:0 to conv4_3/1/conv4_3/1/bn/Const.0
DEBUG: Replaced name conv4_3/1/conv4_3/1/bn/Const.0 to conv4_3.1.conv4_3.1.bn.Const.0
DEBUG: Found weight conv4_3.1.conv4_3.1.bn.Const.0 with shape (128,).
DEBUG: Replaced name conv4_1/projection/weights/read:0 to conv4_1/projection/weights/read.0
DEBUG: Replaced name conv4_1/projection/weights/read.0 to conv4_1.projection.weights.read.0
DEBUG: Found weight conv4_1.projection.weights.read.0 with shape (128, 64, 1, 1).
DEBUG: Replaced name conv4_1/bn/moving_variance/read:0 to conv4_1/bn/moving_variance/read.0
DEBUG: Replaced name conv4_1/bn/moving_variance/read.0 to conv4_1.bn.moving_variance.read.0
DEBUG: Found weight conv4_1.bn.moving_variance.read.0 with shape (64,).
DEBUG: Replaced name conv4_1/bn/moving_mean/read:0 to conv4_1/bn/moving_mean/read.0
DEBUG: Replaced name conv4_1/bn/moving_mean/read.0 to conv4_1.bn.moving_mean.read.0
DEBUG: Found weight conv4_1.bn.moving_mean.read.0 with shape (64,).
DEBUG: Replaced name conv4_1/bn/beta/read:0 to conv4_1/bn/beta/read.0
DEBUG: Replaced name conv4_1/bn/beta/read.0 to conv4_1.bn.beta.read.0
DEBUG: Found weight conv4_1.bn.beta.read.0 with shape (64,).
DEBUG: Replaced name conv4_1/bn/Const:0 to conv4_1/bn/Const.0
DEBUG: Replaced name conv4_1/bn/Const.0 to conv4_1.bn.Const.0
DEBUG: Found weight conv4_1.bn.Const.0 with shape (64,).
DEBUG: Replaced name conv4_1/2/weights/read:0 to conv4_1/2/weights/read.0
DEBUG: Replaced name conv4_1/2/weights/read.0 to conv4_1.2.weights.read.0
DEBUG: Found weight conv4_1.2.weights.read.0 with shape (128, 128, 3, 3).
DEBUG: Replaced name conv4_1/2/biases/read:0 to conv4_1/2/biases/read.0
DEBUG: Replaced name conv4_1/2/biases/read.0 to conv4_1.2.biases.read.0
DEBUG: Found weight conv4_1.2.biases.read.0 with shape (128,).
DEBUG: Replaced name conv4_1/1/weights/read:0 to conv4_1/1/weights/read.0
DEBUG: Replaced name conv4_1/1/weights/read.0 to conv4_1.1.weights.read.0
DEBUG: Found weight conv4_1.1.weights.read.0 with shape (128, 64, 3, 3).
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/moving_variance/read:0 to conv4_1/1/conv4_1/1/bn/moving_variance/read.0
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/moving_variance/read.0 to conv4_1.1.conv4_1.1.bn.moving_variance.read.0
DEBUG: Found weight conv4_1.1.conv4_1.1.bn.moving_variance.read.0 with shape (128,).
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/moving_mean/read:0 to conv4_1/1/conv4_1/1/bn/moving_mean/read.0
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/moving_mean/read.0 to conv4_1.1.conv4_1.1.bn.moving_mean.read.0
DEBUG: Found weight conv4_1.1.conv4_1.1.bn.moving_mean.read.0 with shape (128,).
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/beta/read:0 to conv4_1/1/conv4_1/1/bn/beta/read.0
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/beta/read.0 to conv4_1.1.conv4_1.1.bn.beta.read.0
DEBUG: Found weight conv4_1.1.conv4_1.1.bn.beta.read.0 with shape (128,).
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/Const:0 to conv4_1/1/conv4_1/1/bn/Const.0
DEBUG: Replaced name conv4_1/1/conv4_1/1/bn/Const.0 to conv4_1.1.conv4_1.1.bn.Const.0
DEBUG: Found weight conv4_1.1.conv4_1.1.bn.Const.0 with shape (128,).
DEBUG: Replaced name conv3_3/bn/moving_variance/read:0 to conv3_3/bn/moving_variance/read.0
DEBUG: Replaced name conv3_3/bn/moving_variance/read.0 to conv3_3.bn.moving_variance.read.0
DEBUG: Found weight conv3_3.bn.moving_variance.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/bn/moving_mean/read:0 to conv3_3/bn/moving_mean/read.0
DEBUG: Replaced name conv3_3/bn/moving_mean/read.0 to conv3_3.bn.moving_mean.read.0
DEBUG: Found weight conv3_3.bn.moving_mean.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/bn/beta/read:0 to conv3_3/bn/beta/read.0
DEBUG: Replaced name conv3_3/bn/beta/read.0 to conv3_3.bn.beta.read.0
DEBUG: Found weight conv3_3.bn.beta.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/bn/Const:0 to conv3_3/bn/Const.0
DEBUG: Replaced name conv3_3/bn/Const.0 to conv3_3.bn.Const.0
DEBUG: Found weight conv3_3.bn.Const.0 with shape (64,).
DEBUG: Replaced name conv3_3/2/weights/read:0 to conv3_3/2/weights/read.0
DEBUG: Replaced name conv3_3/2/weights/read.0 to conv3_3.2.weights.read.0
DEBUG: Found weight conv3_3.2.weights.read.0 with shape (64, 64, 3, 3).
DEBUG: Replaced name conv3_3/2/biases/read:0 to conv3_3/2/biases/read.0
DEBUG: Replaced name conv3_3/2/biases/read.0 to conv3_3.2.biases.read.0
DEBUG: Found weight conv3_3.2.biases.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/1/weights/read:0 to conv3_3/1/weights/read.0
DEBUG: Replaced name conv3_3/1/weights/read.0 to conv3_3.1.weights.read.0
DEBUG: Found weight conv3_3.1.weights.read.0 with shape (64, 64, 3, 3).
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/moving_variance/read:0 to conv3_3/1/conv3_3/1/bn/moving_variance/read.0
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/moving_variance/read.0 to conv3_3.1.conv3_3.1.bn.moving_variance.read.0
DEBUG: Found weight conv3_3.1.conv3_3.1.bn.moving_variance.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/moving_mean/read:0 to conv3_3/1/conv3_3/1/bn/moving_mean/read.0
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/moving_mean/read.0 to conv3_3.1.conv3_3.1.bn.moving_mean.read.0
DEBUG: Found weight conv3_3.1.conv3_3.1.bn.moving_mean.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/beta/read:0 to conv3_3/1/conv3_3/1/bn/beta/read.0
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/beta/read.0 to conv3_3.1.conv3_3.1.bn.beta.read.0
DEBUG: Found weight conv3_3.1.conv3_3.1.bn.beta.read.0 with shape (64,).
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/Const:0 to conv3_3/1/conv3_3/1/bn/Const.0
DEBUG: Replaced name conv3_3/1/conv3_3/1/bn/Const.0 to conv3_3.1.conv3_3.1.bn.Const.0
DEBUG: Found weight conv3_3.1.conv3_3.1.bn.Const.0 with shape (64,).
DEBUG: Replaced name conv3_1/projection/weights/read:0 to conv3_1/projection/weights/read.0
DEBUG: Replaced name conv3_1/projection/weights/read.0 to conv3_1.projection.weights.read.0
DEBUG: Found weight conv3_1.projection.weights.read.0 with shape (64, 32, 1, 1).
DEBUG: Replaced name conv3_1/bn/moving_variance/read:0 to conv3_1/bn/moving_variance/read.0
DEBUG: Replaced name conv3_1/bn/moving_variance/read.0 to conv3_1.bn.moving_variance.read.0
DEBUG: Found weight conv3_1.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv3_1/bn/moving_mean/read:0 to conv3_1/bn/moving_mean/read.0
DEBUG: Replaced name conv3_1/bn/moving_mean/read.0 to conv3_1.bn.moving_mean.read.0
DEBUG: Found weight conv3_1.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv3_1/bn/beta/read:0 to conv3_1/bn/beta/read.0
DEBUG: Replaced name conv3_1/bn/beta/read.0 to conv3_1.bn.beta.read.0
DEBUG: Found weight conv3_1.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv3_1/bn/Const:0 to conv3_1/bn/Const.0
DEBUG: Replaced name conv3_1/bn/Const.0 to conv3_1.bn.Const.0
DEBUG: Found weight conv3_1.bn.Const.0 with shape (32,).
DEBUG: Replaced name conv3_1/2/weights/read:0 to conv3_1/2/weights/read.0
DEBUG: Replaced name conv3_1/2/weights/read.0 to conv3_1.2.weights.read.0
DEBUG: Found weight conv3_1.2.weights.read.0 with shape (64, 64, 3, 3).
DEBUG: Replaced name conv3_1/2/biases/read:0 to conv3_1/2/biases/read.0
DEBUG: Replaced name conv3_1/2/biases/read.0 to conv3_1.2.biases.read.0
DEBUG: Found weight conv3_1.2.biases.read.0 with shape (64,).
DEBUG: Replaced name conv3_1/1/weights/read:0 to conv3_1/1/weights/read.0
DEBUG: Replaced name conv3_1/1/weights/read.0 to conv3_1.1.weights.read.0
DEBUG: Found weight conv3_1.1.weights.read.0 with shape (64, 32, 3, 3).
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/moving_variance/read:0 to conv3_1/1/conv3_1/1/bn/moving_variance/read.0
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/moving_variance/read.0 to conv3_1.1.conv3_1.1.bn.moving_variance.read.0
DEBUG: Found weight conv3_1.1.conv3_1.1.bn.moving_variance.read.0 with shape (64,).
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/moving_mean/read:0 to conv3_1/1/conv3_1/1/bn/moving_mean/read.0
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/moving_mean/read.0 to conv3_1.1.conv3_1.1.bn.moving_mean.read.0
DEBUG: Found weight conv3_1.1.conv3_1.1.bn.moving_mean.read.0 with shape (64,).
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/beta/read:0 to conv3_1/1/conv3_1/1/bn/beta/read.0
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/beta/read.0 to conv3_1.1.conv3_1.1.bn.beta.read.0
DEBUG: Found weight conv3_1.1.conv3_1.1.bn.beta.read.0 with shape (64,).
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/Const:0 to conv3_1/1/conv3_1/1/bn/Const.0
DEBUG: Replaced name conv3_1/1/conv3_1/1/bn/Const.0 to conv3_1.1.conv3_1.1.bn.Const.0
DEBUG: Found weight conv3_1.1.conv3_1.1.bn.Const.0 with shape (64,).
DEBUG: Replaced name conv2_3/bn/moving_variance/read:0 to conv2_3/bn/moving_variance/read.0
DEBUG: Replaced name conv2_3/bn/moving_variance/read.0 to conv2_3.bn.moving_variance.read.0
DEBUG: Found weight conv2_3.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/bn/moving_mean/read:0 to conv2_3/bn/moving_mean/read.0
DEBUG: Replaced name conv2_3/bn/moving_mean/read.0 to conv2_3.bn.moving_mean.read.0
DEBUG: Found weight conv2_3.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/bn/beta/read:0 to conv2_3/bn/beta/read.0
DEBUG: Replaced name conv2_3/bn/beta/read.0 to conv2_3.bn.beta.read.0
DEBUG: Found weight conv2_3.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/bn/Const:0 to conv2_3/bn/Const.0
DEBUG: Replaced name conv2_3/bn/Const.0 to conv2_3.bn.Const.0
DEBUG: Found weight conv2_3.bn.Const.0 with shape (32,).
DEBUG: Replaced name conv2_3/2/weights/read:0 to conv2_3/2/weights/read.0
DEBUG: Replaced name conv2_3/2/weights/read.0 to conv2_3.2.weights.read.0
DEBUG: Found weight conv2_3.2.weights.read.0 with shape (32, 32, 3, 3).
DEBUG: Replaced name conv2_3/2/biases/read:0 to conv2_3/2/biases/read.0
DEBUG: Replaced name conv2_3/2/biases/read.0 to conv2_3.2.biases.read.0
DEBUG: Found weight conv2_3.2.biases.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/1/weights/read:0 to conv2_3/1/weights/read.0
DEBUG: Replaced name conv2_3/1/weights/read.0 to conv2_3.1.weights.read.0
DEBUG: Found weight conv2_3.1.weights.read.0 with shape (32, 32, 3, 3).
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/moving_variance/read:0 to conv2_3/1/conv2_3/1/bn/moving_variance/read.0
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/moving_variance/read.0 to conv2_3.1.conv2_3.1.bn.moving_variance.read.0
DEBUG: Found weight conv2_3.1.conv2_3.1.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/moving_mean/read:0 to conv2_3/1/conv2_3/1/bn/moving_mean/read.0
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/moving_mean/read.0 to conv2_3.1.conv2_3.1.bn.moving_mean.read.0
DEBUG: Found weight conv2_3.1.conv2_3.1.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/beta/read:0 to conv2_3/1/conv2_3/1/bn/beta/read.0
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/beta/read.0 to conv2_3.1.conv2_3.1.bn.beta.read.0
DEBUG: Found weight conv2_3.1.conv2_3.1.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/Const:0 to conv2_3/1/conv2_3/1/bn/Const.0
DEBUG: Replaced name conv2_3/1/conv2_3/1/bn/Const.0 to conv2_3.1.conv2_3.1.bn.Const.0
DEBUG: Found weight conv2_3.1.conv2_3.1.bn.Const.0 with shape (32,).
DEBUG: Replaced name conv2_1/2/weights/read:0 to conv2_1/2/weights/read.0
DEBUG: Replaced name conv2_1/2/weights/read.0 to conv2_1.2.weights.read.0
DEBUG: Found weight conv2_1.2.weights.read.0 with shape (32, 32, 3, 3).
DEBUG: Replaced name conv2_1/2/biases/read:0 to conv2_1/2/biases/read.0
DEBUG: Replaced name conv2_1/2/biases/read.0 to conv2_1.2.biases.read.0
DEBUG: Found weight conv2_1.2.biases.read.0 with shape (32,).
DEBUG: Replaced name conv2_1/1/weights/read:0 to conv2_1/1/weights/read.0
DEBUG: Replaced name conv2_1/1/weights/read.0 to conv2_1.1.weights.read.0
DEBUG: Found weight conv2_1.1.weights.read.0 with shape (32, 32, 3, 3).
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/moving_variance/read:0 to conv2_1/1/conv2_1/1/bn/moving_variance/read.0
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/moving_variance/read.0 to conv2_1.1.conv2_1.1.bn.moving_variance.read.0
DEBUG: Found weight conv2_1.1.conv2_1.1.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/moving_mean/read:0 to conv2_1/1/conv2_1/1/bn/moving_mean/read.0
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/moving_mean/read.0 to conv2_1.1.conv2_1.1.bn.moving_mean.read.0
DEBUG: Found weight conv2_1.1.conv2_1.1.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/beta/read:0 to conv2_1/1/conv2_1/1/bn/beta/read.0
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/beta/read.0 to conv2_1.1.conv2_1.1.bn.beta.read.0
DEBUG: Found weight conv2_1.1.conv2_1.1.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/Const:0 to conv2_1/1/conv2_1/1/bn/Const.0
DEBUG: Replaced name conv2_1/1/conv2_1/1/bn/Const.0 to conv2_1.1.conv2_1.1.bn.Const.0
DEBUG: Found weight conv2_1.1.conv2_1.1.bn.Const.0 with shape (32,).
DEBUG: Replaced name conv1_2/weights/read:0 to conv1_2/weights/read.0
DEBUG: Replaced name conv1_2/weights/read.0 to conv1_2.weights.read.0
DEBUG: Found weight conv1_2.weights.read.0 with shape (32, 32, 3, 3).
DEBUG: Replaced name conv1_2/conv1_2/bn/moving_variance/read:0 to conv1_2/conv1_2/bn/moving_variance/read.0
DEBUG: Replaced name conv1_2/conv1_2/bn/moving_variance/read.0 to conv1_2.conv1_2.bn.moving_variance.read.0
DEBUG: Found weight conv1_2.conv1_2.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv1_2/conv1_2/bn/moving_mean/read:0 to conv1_2/conv1_2/bn/moving_mean/read.0
DEBUG: Replaced name conv1_2/conv1_2/bn/moving_mean/read.0 to conv1_2.conv1_2.bn.moving_mean.read.0
DEBUG: Found weight conv1_2.conv1_2.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv1_2/conv1_2/bn/beta/read:0 to conv1_2/conv1_2/bn/beta/read.0
DEBUG: Replaced name conv1_2/conv1_2/bn/beta/read.0 to conv1_2.conv1_2.bn.beta.read.0
DEBUG: Found weight conv1_2.conv1_2.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv1_2/conv1_2/bn/Const:0 to conv1_2/conv1_2/bn/Const.0
DEBUG: Replaced name conv1_2/conv1_2/bn/Const.0 to conv1_2.conv1_2.bn.Const.0
DEBUG: Found weight conv1_2.conv1_2.bn.Const.0 with shape (32,).
DEBUG: Replaced name conv1_1/weights/read:0 to conv1_1/weights/read.0
DEBUG: Replaced name conv1_1/weights/read.0 to conv1_1.weights.read.0
DEBUG: Found weight conv1_1.weights.read.0 with shape (32, 3, 3, 3).
DEBUG: Replaced name conv1_1/conv1_1/bn/moving_variance/read:0 to conv1_1/conv1_1/bn/moving_variance/read.0
DEBUG: Replaced name conv1_1/conv1_1/bn/moving_variance/read.0 to conv1_1.conv1_1.bn.moving_variance.read.0
DEBUG: Found weight conv1_1.conv1_1.bn.moving_variance.read.0 with shape (32,).
DEBUG: Replaced name conv1_1/conv1_1/bn/moving_mean/read:0 to conv1_1/conv1_1/bn/moving_mean/read.0
DEBUG: Replaced name conv1_1/conv1_1/bn/moving_mean/read.0 to conv1_1.conv1_1.bn.moving_mean.read.0
DEBUG: Found weight conv1_1.conv1_1.bn.moving_mean.read.0 with shape (32,).
DEBUG: Replaced name conv1_1/conv1_1/bn/beta/read:0 to conv1_1/conv1_1/bn/beta/read.0
DEBUG: Replaced name conv1_1/conv1_1/bn/beta/read.0 to conv1_1.conv1_1.bn.beta.read.0
DEBUG: Found weight conv1_1.conv1_1.bn.beta.read.0 with shape (32,).
DEBUG: Replaced name conv1_1/conv1_1/bn/Const:0 to conv1_1/conv1_1/bn/Const.0
DEBUG: Replaced name conv1_1/conv1_1/bn/Const.0 to conv1_1.conv1_1.bn.Const.0
DEBUG: Found weight conv1_1.conv1_1.bn.Const.0 with shape (32,).
DEBUG: Replaced name ball/moving_variance/read:0 to ball/moving_variance/read.0
DEBUG: Replaced name ball/moving_variance/read.0 to ball.moving_variance.read.0
DEBUG: Found weight ball.moving_variance.read.0 with shape (128,).
DEBUG: Replaced name ball/moving_mean/read:0 to ball/moving_mean/read.0
DEBUG: Replaced name ball/moving_mean/read.0 to ball.moving_mean.read.0
DEBUG: Found weight ball.moving_mean.read.0 with shape (128,).
DEBUG: Replaced name ball/beta/read:0 to ball/beta/read.0
DEBUG: Replaced name ball/beta/read.0 to ball.beta.read.0
DEBUG: Found weight ball.beta.read.0 with shape (128,).
DEBUG: Replaced name ball/Reshape/shape:0 to ball/Reshape/shape.0
DEBUG: Replaced name ball/Reshape/shape.0 to ball.Reshape.shape.0
DEBUG: Found weight ball.Reshape.shape.0 with shape (4,).
DEBUG: Replaced name ball/Const:0 to ball/Const.0
DEBUG: Replaced name ball/Const.0 to ball.Const.0
DEBUG: Found weight ball.Const.0 with shape (128,).
DEBUG: Replaced name Sum/reduction_indices:0 to Sum/reduction_indices.0
DEBUG: Replaced name Sum/reduction_indices.0 to Sum.reduction_indices.0
DEBUG: Found weight Sum.reduction_indices.0 with shape (1,).
DEBUG: Replaced name Flatten/flatten/Reshape/shape__6 to Flatten.flatten.Reshape.shape__6
DEBUG: Found weight Flatten.flatten.Reshape.shape__6 with shape (2,).
DEBUG: Replaced name Const:0 to Const.0
DEBUG: Found weight Const.0 with shape ().
DEBUG: Replaced name images:0 to images.0
DEBUG: Found input images.0 with shape [128, 64, 3]
DEBUG: Replaced name fc1/fc1/bn/Reshape__69:0 to fc1/fc1/bn/Reshape__69.0
DEBUG: Replaced name fc1/fc1/bn/Reshape__69.0 to fc1.fc1.bn.Reshape__69.0
DEBUG: ######
DEBUG: ...
DEBUG: Converting ONNX operation
DEBUG: type: Cast
DEBUG: node_name: fc1/fc1/bn/Reshape__69:0
DEBUG: node_params: {'to': 7, 'change_ordering': False, 'name_policy': 'renumerate', 'batch_size': 0, 'opset': 13}
DEBUG: ...
DEBUG: Check if all inputs are available:
DEBUG: Replaced name fc1/fc1/bn/Reshape/shape:0 to fc1/fc1/bn/Reshape/shape.0
DEBUG: Replaced name fc1/fc1/bn/Reshape/shape.0 to fc1.fc1.bn.Reshape.shape.0
DEBUG: Check input 0 (name fc1.fc1.bn.Reshape.shape.0).
DEBUG: The input not found in layers / model inputs.
DEBUG: Found in weights, add as a numpy constant.
DEBUG: Cast numpy array
DEBUG: Output TF Layer -> [ -1 1 1 128]
DEBUG: Replaced name conv1_1/Conv2D__7:0 to conv1_1/Conv2D__7.0
DEBUG: Replaced name conv1_1/Conv2D__7.0 to conv1_1.Conv2D__7.0
DEBUG: ######
DEBUG: ...
DEBUG: Converting ONNX operation
DEBUG: type: Transpose
DEBUG: node_name: conv1_1/Conv2D__7:0
DEBUG: node_params: {'perm': [0, 3, 1, 2], 'change_ordering': False, 'name_policy': 'renumerate', 'batch_size': 0, 'opset': 13}
DEBUG: ...
DEBUG: Check if all inputs are available:
DEBUG: Replaced name images:0 to images.0
DEBUG: Modified layer name from fc1/fc1/bn/Reshape__69:0 to fc1/fc1/bn/Reshape__69.0
DEBUG: Check input 0 (name images.0).
DEBUG: Output TF Layer -> KerasTensor(type_spec=TensorSpec(shape=(None, 3, 128, 64), dtype=tf.float32, name=None), name='LAYER_1/transpose:0', description="created by layer 'LAYER_1'")
DEBUG: Replaced name conv1_1/Conv2D:0 to conv1_1/Conv2D.0
DEBUG: Replaced name conv1_1/Conv2D.0 to conv1_1.Conv2D.0
DEBUG: ######
DEBUG: ...
DEBUG: Converting ONNX operation
DEBUG: type: Conv
DEBUG: node_name: conv1_1/Conv2D:0
DEBUG: node_params: {'dilations': [1, 1], 'strides': [1, 1], 'kernel_shape': [3, 3], 'pads': [1, 1, 1, 1], 'group': 1, 'change_ordering': False, 'name_policy': 'renumerate', 'batch_size': 0, 'opset': 13}
DEBUG: ...
DEBUG: Check if all inputs are available:
DEBUG: Replaced name conv1_1/Conv2D__7:0 to conv1_1/Conv2D__7.0
DEBUG: Replaced name conv1_1/Conv2D__7.0 to conv1_1.Conv2D__7.0
DEBUG: Replaced name conv1_1/weights/read:0 to conv1_1/weights/read.0
DEBUG: Replaced name conv1_1/weights/read.0 to conv1_1.weights.read.0
DEBUG: Modified layer name from fc1/fc1/bn/Reshape__69.0 to fc1.fc1.bn.Reshape__69.0
DEBUG: Modified layer name from conv1_1/Conv2D__7:0 to conv1_1/Conv2D__7.0
DEBUG: Check input 0 (name conv1_1.Conv2D__7.0).
DEBUG: The input not found in layers / model inputs.
Traceback (most recent call last):
File "/home/ubuntu/.conda/envs/launcher_3.8/bin/tao_byom", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/.conda/envs/launcher_3.8/lib/python3.8/site-packages/tao_byom/entrypoint/entrypoint.py", line 167, in main
k_model, layer_mappings, lambda_dicts = tao_byom_converter(onnx_model,
File "/home/ubuntu/.conda/envs/launcher_3.8/lib/python3.8/site-packages/tao_byom/converter.py", line 260, in tao_byom_converter
raise AttributeError(f'Current node is not in weights / model inputs / layers. {node_input}')
AttributeError: Current node is not in weights / model inputs / layers. conv1_1.Conv2D__7.0
Note: This is using the non-optimised ONNX model (I’ve removed the optimisation from the tf2onnx conversion script because the converted optimised model was not working either)
I’ve uploaded the two ONNX models there: onnx_models - Google Drive
Any help would be appreciated.
Thanks
• Network Type: Classification/ResNet (ReID)
• TAO version: 5.3.0