<p dir="auto">By calling</p>
<p dir="auto">graph.get_tensor_by_name("output:0")<br>
I found that it returns a tensor shaped [batch_size,num]，How to test a saved model trained with tf.train.batch ?</p>
<p dir="auto">For an input with an undefined batch size, <code class="notranslate">atrous_conv2d</code> emits tensors where all except the final dimension are undefined:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="input = tf.placeholder(tf.float32, (None, 256, 256, 3))

conv = tf.nn.conv2d(input, tf.zeros((3, 3, 3, 16)), strides=[1, 1, 1, 1], padding='SAME')
print(conv.get_shape()) # Correctly displays (?, 256, 256, 16)

dilated = tf.nn.atrous_conv2d(input, tf.zeros((3, 3, 3, 16)), rate=2, padding='SAME')
print(dilated.get_shape()) # Displays (?, ?, ?, 16)"><pre class="notranslate"><span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, (<span class="pl-c1">None</span>, <span class="pl-c1">256</span>, <span class="pl-c1">256</span>, <span class="pl-c1">3</span>))

<span class="pl-s1">conv</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">conv2d</span>(<span class="pl-s1">input</span>, <span class="pl-s1">tf</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">16</span>)), <span class="pl-s1">strides</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], <span class="pl-s1">padding</span><span class="pl-c1">=</span><span class="pl-s">'SAME'</span>)
<span class="pl-en">print</span>(<span class="pl-s1">conv</span>.<span class="pl-en">get_shape</span>()) <span class="pl-c"># Correctly displays (?, 256, 256, 16)</span>

<span class="pl-s1">dilated</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">atrous_conv2d</span>(<span class="pl-s1">input</span>, <span class="pl-s1">tf</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">16</span>)), <span class="pl-s1">rate</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">padding</span><span class="pl-c1">=</span><span class="pl-s">'SAME'</span>)
<span class="pl-en">print</span>(<span class="pl-s1">dilated</span>.<span class="pl-en">get_shape</span>()) <span class="pl-c"># Displays (?, ?, ?, 16)</span></pre></div>
<p dir="auto">(For concrete batch sizes, everything works as expected.)</p>
<p dir="auto">Tested on <code class="notranslate">0.10.0rc0</code></p>