0 votes
1 view
in Machine Learning by (12.5k points)

I am new to TensorFlow. While I am reading the existing documentation, I found the term tensor really confusing. Because of it, I need to clarify the following questions:

What is the relationship between tensor and Variable, tensor

vs. tf.constant, 'tensor' vs. tf.placeholder?

Are they all types of tensors?

1 Answer

0 votes
by (32.7k points)

TensorFlow, as the name shows, is a framework to define and run computations including tensors. A tensor is a generalization of vectors and matrices to potentially higher dimensions. TensorFlow represents tensors as n-dimensional arrays of base datatypes.

When writing a TensorFlow program, the main object you manipulate and pass around is the tf.Tensor. A tf.Tensor object represents a partially defined computation that will eventually produce a value. 

An operation allocates memory for its outputs, which are available on endpoints :0, :1, etc, and you can think of each of these endpoints as a Tensor.

...