Tensorflow Slim: TypeError: Expected int32, got list containing Tensors of type '_Message' instead

I got the same problem when using the 1.0 released and I could make it work without having to roll back on a previous version.

The problem is caused by change in the api. That discussion helped me to find the solution: Google group > Recent API Changes in TensorFlow

You just have to update all the line with tf.concat

for example

net = tf.concat(3, [branch_0, branch_1, branch_2, branch_3])

should be changed to

net = tf.concat([branch_0, branch_1, branch_2, branch_3], 3)

Note:

I was able to use the models without problem. But I still got error afterward when wanting to load the pretrained weight. Seems that the slim module got several changed since they made the checkpoint file. The graph created by the code and the one present in the checkpoint file were different.

Note2:

I was able to use the pretrain weights for inception_resnet_v2 by adding to all conv2d layer biases_initializer=None


explicitly writing the name of the arguments solves the problem.

instead of

net = tf.concat(3, [branch_0, branch_1, branch_2, branch_3])

use

net = tf.concat(axis=3, values=[branch_0, branch_1, branch_2, branch_3])