Tensorflow Assign requires shapes of both tensors to match. lhs shape= [20] rhs shape= [48]
<p>I am a TensorFlow noob. I have trained a TensorFlow model from the open source implementation of deeppose and have to now run the model against a new set of images.</p>

<p>The model was trained on images of size <code>100 * 100</code> so I have resized the new set of images to the same size. I have <code>149</code> new images to run the model against. When I run the model, I get the following error.</p>

<pre><code>InvalidArgumentError (see above for traceback): Assign requires shapes
of both tensors to match. lhs shape= [20] rhs shape= [48]
</code></pre>

<p>At the line</p>

<pre><code>saver = tf.train.Saver(tf.all_variables())
</code></pre>

<p>I suspect the trained model size and the test image sizes are not matching. I am not clear how to fix this issue. I printed out the list of variables from the <code>tf.all_variables()</code> call. Here it is</p>

<pre><code>Tensor("Placeholder:0", shape=(128, 100, 100, 3), dtype=float32)
(11, 11, 3, 20)
conv1/weights:0
(20,)
conv1/biases:0
(5, 5, 20, 35)
conv2/weights:0
(35,)
conv2/biases:0
(3, 3, 35, 50)
conv4/weights:0
(50,)
conv4/biases:0
(3, 3, 50, 75)
conv5/weights:0
(75,)
conv5/biases:0
(300, 1024)
local1/weights:0
(1024,)
local1/biases:0
(1024, 1024)
local2/weights:0
(1024,)
local2/biases:0
(1024, 0)
softmax_linear/weights:0
(0,)
softmax_linear/biases:0
</code></pre>

<p>I am not sure where the RHS parameter is coming from. I've looked at all config files and there doesn't seem to be any parameter specifying this config.</p>

<p>Any help in resolving this will be greatly appreciated.</p>