I have a variable batch size, so all my inputs are of the form
tf.placeholder(tf.float32, shape=(None, ...)
to take the size of the variable. However, how can you create a constant value with a variable batch size? The problem is this line:
log_probs = tf.constant(0.0, dtype=tf.float32, shape=[None, 1])
This gives me an error:
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
I am sure that it is possible to initialize a constant tensor with a variable batch size, how can I do this?
I also tried the following:
tf.constant(0.0, dtype=tf.float32, shape=[-1, 1])
I get this error:
ValueError: Too many elements provided. Needed at most -1, but received 1
source share