A calculating FIG.
TensorFlow the two most important concepts, one Tensor, is a Flow. Tensor is a tensor, Flow is calculated flow. Each node calculation map is a tensor, and the dependencies between the tensor is calculated flow, i.e. in the computation graph by calculating from one stream to another Tensor Tensor.
import tensorflow as tf a = tf.constant([1.0,2.0], name='a') b = tf.constant([3.0,4.0], name='b') result = a + b
By tf.get_default_graph can obtain the current default calculate a function, by tf.Graph () defines a computation graph. FIG addition calculation used to isolate and tensor calculations, may be a separately defined using a GPU computing device in FIG.
In calculating the figures, it can be set collection
to manage resources of different categories, such as by tf.add_to_collection
resources may be added to the set of one or more functions, then through tf.get_collection
a set of all the resources inside the acquisition. The resources here can be a queue resources tensor, variable, or run TensorFlow program needs.
Second, the tensor (Tensor)
From TensorFlow name can be seen in the tensor (Tensor) is a very important concept, it can be said tensorflow the basic unit. Popular appreciated that in TensorFlow are calculated as a basic unit in Tensor stream. It can also be understood as a multi-dimensional array. In tensor does not really save the number, it is how to get hold of the calculation of these figures .
A tensor saved three main attributes: name: name, dimensions: shape, type: type.