2
votes

In tensorflow tutorial for word embedding one finds:

# Placeholders for inputs
train_inputs = tf.placeholder(tf.int32, shape=[batch_size])
train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1])

What is possibly the difference between these two placeholders. Aren't they both a int32 column vector of size batch_size?

Thanks.

2

2 Answers

2
votes

I found the answer with a little debugging.

[batch_size] = [ 0, 2, ...]
[batch_size, 1] = [ [0], [2], ...]

Though still don't know why using the second form.

0
votes

train_inputs is a row vector while train_labels is a column vector.