Reputation: 1711
I'm following this tensorflow tutorial.
This is a basic question but I want to make sure I fully understand it. Are tensor dimensions described as row x column.
In this line:
x = tf.placeholder(tf.float32, [None, 784])
Does this mean that there are 784 columns and any number of rows?
https://www.tensorflow.org/versions/r1.3/get_started/mnist/beginners
Upvotes: 2
Views: 1807
Reputation: 2982
A Tensor
can loosely be seen as an n
-dimensional vector.
Hence,
None
means the Tensor can receive an arbitrary number.
Upvotes: 1
Reputation: 696
A rank 2 tensor is equivalent to a matrix in tensorflow, and the rows and columns can be thought of in the way that you have described. A typical use case for the None
value for a dimension is to allow for a variable number of examples. In your case, x
would be well-suited to holding any number of examples, each of which have 784 feature values.
Upvotes: 0