Ternsorflow learning: 002-Tensorflow basics

Preface:

Before using TensorFlow you need to know the basics of TensorFlow:

  • FIG (Graphs) represented calculations.
  • Executes session (session) in.
  • Use tensor (tensors) to represent the data.
  • By maintaining state variables (variables).
  • Use supply (feeds) and retrieving (fetches) the operation of any incoming or outgoing data.

Overview

In FIG TensorFlow is a (Graphs) is calculated to represent the programming system, nodes in the graph is called (abbreviation of operation) op. Op obtaining a zero or more tensors (tensors) performs the calculation, generating zero or more tensor. Tensor is a multi-dimensional array by Type. For example, you can set a group image is represented as a four-dimensional array of floating point numbers, the four dimensions are [batch, height, width, channels].

FIG TensorFlow is an abstract description of the calculation. Before calculation-start, FIG must session ( Session()started); the distribution of the session to FIG op such as a CPU or a GPU devices ( Devices()on), while providing a method of performing op.

After performing these processes, tensor (Tensor) will produce a return. (In Python language, it returns the ndarray numpy objects; in C and C ++ language, it returns tensorflow :: Tensor instance.)

TensorFlow supports C, C ++, Python programming language. Currently, TensorFlow Python library easier to use, it provides a number of auxiliary functions to simplify the work of constructing a map, and these functions are not supported in C and C ++ libraries.

Figure computing

Typically, TensorFlow programming organized according to two phases: Construction and execution phases; FIG former for tissue calculation, calculation is performed in the drawing operation op which use the session.
For example, create a chart to represent during the construction phase and train the neural network, and then repeatedly execute a set op to implement training in the implementation phase diagram.

Guess you like

Origin www.cnblogs.com/schips/p/12147328.html