Variable shape tensor
<p>I need to get a tensor that is variable shape as I do not know the vector size before hand. So far I tried: </p>

<pre><code>hashtag_len = tf.placeholder(tf.int32)
train_hashtag = tf.placeholder(tf.int32, shape=[hashtag_len])
</code></pre>

<p>but I get the error <code>TypeError: int() argument must be a string, a bytes-like object or a number, not 'Tensor'</code>. </p>

<p>The only other way around this that I can think of is to pad the vector with enough zeros so that I can fit the intended vector inside a giant vector. Seems like tensorflow should have a better way of doing this.</p>

<p>Use</p>

<p><code>tf.placeholder(tf.int32)</code></p>

<p>That creates placeholder of arbitrary shape</p>

python tensorflow