TensorFlow 将图形定义转换成分布式执行的操作, 以充分利用可用的计算资源(如 CPU 或 GPU。一般你不需要显式指定使用 CPU 还是 GPU, TensorFlow 能自动检测。如果检测到 GPU, TensorFlow 会尽可能地利用找到的第一个 GPU 来执行操作.并行计算能让代价大的算法计算加速执行,TensorFlow也在实现上对复杂操作进行了有效的改进。大部分核相关的操作都是设备相关的实现,比如GPU。
Original connection: https://cloud.tencent.com/developer/article/1157470
Some important operations:
Action group | operating |
Maths | Add, Sub, Mul, Div, Exp, Log, Greater, Less, Equal |
Array | Concat, Slice, Split, Constant, Rank, Shape, Shuffle |
Matrix | MatMul, MatrixInverse, MatrixDeterminant |
Neuronal Network | SoftMax, Sigmoid, ReLU, Convolution2D, MaxPool |
Checkpointing | Save, Restore |
Queues and syncronizations | Enqueue, Dequeue, MutexAcquire, MutexRelease |
Flow control | Merge, Switch, Enter, Leave, NextIteration |
A: tensorflow arithmetic operation
operating | description |
tf.add(x, y, name=None) | Summing |
tf.sub(x, y, name=None) | Subtraction |
tf.mul(x, y, name=None) | multiplication |
tf.div(x, y, name=None) | division |
tf.mod(x, y, name=None) | Modulo |
tf.abs(x, name=None) | Absolute value |
tf.neg(x, name=None) | Takes a negative (y = -x) |
tf.sign(x, name=None) | Return symbol y = sign (x) = -1 if x <0; 0 if x == 0; 1 if x> 0. |
tf.inv(x, name=None) | Negate |
tf.square(x, name=None) | Calculating the square of (y = x * x = x ^ 2) |
tf.round(x, name=None) | Rounding to the nearest integer # 'a' is [0.9, 2.5, 2.3, -4.4] tf.round (a) ==> [1.0, 3.0, 2.0, -4.0] |
tf.sqrt(x, name=None) | Square root (y = \ sqrt {x} = x ^ {1/2}). |
tf.pow(x, y, name=None) | A power of (element level) # tensor 'x' is [[2, 2], [3, 3]] # tensor 'y' is [[8, 16], [2, 3]] tf.pow (x , y) ==> [[256, 65536], [9, 27]] |
tf.exp(x, name=None) | Calculating the power of e |
tf.log(x, name=None) | Calculating log, a calculated input e of ln, a second input to two input bottom |
tf.maximum(x, y, name=None) | Returns the maximum value (x> y x:? Y) |
tf.minimum(x, y, name=None) | Returns the minimum value (x <y x:? Y) |
tf.cos(x, name=None) | Trigonometric cosine |
tf.sin(x, name=None) | Trigonometric sine |
tf.tan(x, name=None) | Trigonometric functions tan |
tf.atan(x, name=None) | Trigonometric ctan |