---
title: 支持TensorFlow算子清单
description: "该算子规格仅适用于TensorFlow框架（TensorFlow版本为1.15与2.6.5）原生IR定义的网络模型，参数解释请参见TensorFlow官网(https://www.tensorflow.org/api_docs)。如果要查看基于Ascend IR定义的单算子信息，请参见Ascend IR算子规格说明。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/aolapi/operatorlist_00097.html
sourcePath: /source/zh/canncommercial/900/API/aolapi/operatorlist_00097.html
indexId: ffbf1ef0fd53585985675cd53b81e11f586925dda98d579761846cca00391df864
---
# 支持TensorFlow算子清单

该算子规格仅适用于TensorFlow框架（TensorFlow版本为1.15与2.6.5）原生IR定义的网络模型，参数解释请参见TensorFlow官网(https://www.tensorflow.org/api_docs)。如果要查看基于Ascend IR定义的单算子信息，请参见Ascend IR算子规格说明。

| 支持的TF算子名称 | 算子分类 | 算子功能 |
| --- | --- | --- |
| Abs | math\_ops | Computes the absolute value of a tensor. |
| AccumulateNV2 | math\_ops | Returns the element\-wise sum of a list of tensors. |
| Acos | math\_ops | Computes acos of x element\-wise. |
| Acosh | math\_ops | Computes inverse hyperbolic cosine of x element\-wise. |
| Add | math\_ops | Returns x + y element\-wise. |
| AddN | math\_ops | Add all input tensors element wise. |
| AddV2 | math\_ops | Returns x + y element\-wise. |
| All | math\_ops | Computes the "logical and" of elements across dimensions of a tensor. |
| Any | math\_ops | Computes the "logical or" of elements across dimensions of a tensor. |
| ApproximateEqual | math\_ops | Returns the truth value of abs(x\-y) < tolerance element\-wise. Atlas 350 加速卡不支持该算子。 |
| ArgMax | math\_ops | Returns the index with the largest value across dimensions of a tensor. |
| ArgMin | math\_ops | Returns the index with the smallest value across dimensions of a tensor. |
| Asin | math\_ops | Computes asin of x element\-wise. |
| Asinh | math\_ops | Computes inverse hyperbolic sine of x element\-wise. |
| Atan | math\_ops | Computes atan of x element\-wise. |
| Atan2 | math\_ops | Computes arctangent of y/x element\-wise, respecting signs of the arguments. |
| Atanh | math\_ops | Computes inverse hyperbolic tangent of x element\-wise. |
| AvgPool | nn\_ops | Performs average pooling on the input. |
| Batch | batch\_ops | \- |
| BatchMatMul | math\_ops | Multiplies slices of two tensors in batches. |
| BatchToSpace | array\_ops | BatchToSpace for 4\-D tensors of type T. |
| BatchToSpaceND | array\_ops | BatchToSpace for N\-D tensors of type T. |
| BesselI0e | math\_ops | Computes the Bessel i0e function of x element\-wise. |
| BesselI1e | math\_ops | Computes the Bessel i1e function of x element\-wise. |
| Betainc | math\_ops | Compute the regularized incomplete beta integral \(I\_x(a, b)\). |
| BiasAdd | nn\_ops | Adds bias to value. |
| Bincount | math\_ops | Counts the number of occurrences of each value in an integer array. |
| BitwiseAnd | bitwise\_ops | \- |
| BitwiseOr | bitwise\_ops | \- |
| BitwiseXor | bitwise\_ops | \- |
| BroadcastTo | array\_ops | Broadcast an array for a compatible shape. |
| Bucketize | math\_ops | Bucketizes 'input' based on 'boundaries'. |
| Cast | math\_ops | Cast x of type SrcT to y of DstT. |
| Ceil | math\_ops | Returns element\-wise smallest integer not less than x. |
| CheckNumerics | array\_ops | Checks a tensor for NaN and Inf values. |
| Cholesky | linalg\_ops | \- |
| CholeskyGrad | linalg\_ops | \- |
| ClipByValue | math\_ops | Clips tensor values to a specified min and max. |
| CompareAndBitpack | math\_ops | Compare values of input to threshold and pack resulting bits into a uint8. |
| Concat | array\_ops | Concatenates tensors along one dimension. |
| ConcatV2 | array\_ops | \- |
| Const | array\_ops | \- |
| ControlTrigger | control\_flow\_ops | Does nothing. |
| Conv2D | nn\_ops | Computes a 2\-D convolution given 4\-D input and filter tensors. |
| Conv2DBackpropFilter | nn\_ops | Computes the gradients of convolution with respect to the filter. |
| Conv2DBackpropInput | nn\_ops | Computes the gradients of convolution with respect to the input. |
| Conv3D | nn\_ops | Computes a 3D convolution given 5D "x" and "filter" tensor. |
| Cos | math\_ops | Computes cos of x element\-wise. |
| Cosh | math\_ops | Computes hyperbolic cosine of x element\-wise. |
| Cumprod | math\_ops | Compute the cumulative product of the tensor x along axis. |
| Cumsum | math\_ops | Compute the cumulative sum of the tensor x along axis. |
| DataFormatDimMap | nn\_ops | Returns the dimension index in the destination data format given the one in. |
| DataFormatVecPermute | nn\_ops | Returns the permuted vector/tensor in the destination data format given the. |
| DepthToSpace | array\_ops | DepthToSpace for tensors of type T. |
| DepthwiseConv2dNative | nn\_ops | Computes a 2\-D depthwise convolution given 4\-D input and filter tensors. |
| DepthwiseConv2dNativeBackpropFilter | nn\_ops | Computes the gradients of depthwise convolution with respect to the filter. |
| DepthwiseConv2dNativeBackpropInput | nn\_ops | Computes the gradients of depthwise convolution with respect to the input. |
| Dequantize | array\_ops | Dequantize the 'input' tensor into a float Tensor. |
| Diag | array\_ops | Returns a diagonal tensor with a given diagonal values. |
| DiagPart | array\_ops | Returns the diagonal part of the tensor. |
| Div | math\_ops | Returns x / y element\-wise. |
| DivNoNan | math\_ops | Returns 0 if the denominator is zero. |
| Elu | nn\_ops | Computes exponential linear: exp(features) \- 1 if < 0, features otherwise. |
| Empty | array\_ops | Creates a tensor with the given shape. |
| Enter | control\_flow\_ops | \- |
| Equal | math\_ops | Returns the truth value of (x == y) element\-wise. |
| Erf | math\_ops | Computes the Gauss error function of x element\-wise. |
| Erfc | math\_ops | Computes the complementary error function of x element\-wise. |
| Exit | control\_flow\_ops | \- |
| Exp | math\_ops | Computes exponential of x element\-wise. |
| ExpandDims | array\_ops | Inserts a dimension of 1 into a tensor's shape. |
| Expm1 | math\_ops | Computes exponential of x \- 1 element\-wise. |
| ExtractImagePatches | array\_ops | Extract patches from images and put them in the "depth" output dimension. |
| FakeQuantWithMinMaxArgs | array\_ops | Fake\-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type. |
| FakeQuantWithMinMaxVars | array\_ops | Fake\-quantize the 'inputs' tensor of type float via global float scalars min. |
| FakeQuantWithMinMaxVarsPerChannel | array\_ops | Fake\-quantize the 'inputs' tensor of type float and one of the shapes: [d],. |
| Fill | array\_ops | Creates a tensor filled with a scalar value. |
| Floor | math\_ops | Returns element\-wise largest integer not greater than x. |
| FloorDiv | math\_ops | Returns x // y element\-wise. |
| FloorMod | math\_ops | Returns element\-wise remainder of division. |
| FractionalAvgPool | nn\_ops | Performs fractional average pooling on the input. |
| FractionalAvgPoolGrad | nn\_ops | \- |
| FractionalMaxPool | nn\_ops | Performs fractional max pooling on the input. |
| FractionalMaxPoolGrad | nn\_ops | \- |
| FusedBatchNorm | nn\_ops | Batch normalization. |
| FusedBatchNormV2 | nn\_ops | Batch normalization. |
| Gather | array\_ops | Gather slices from params according to indices. |
| GatherNd | array\_ops | Gather slices from params into a Tensor with shape specified by indices. |
| GatherV2 | array\_ops | Gather slices from params axis according to indices. |
| Greater | math\_ops | Returns the truth value of (x > y) element\-wise. |
| GreaterEqual | math\_ops | Returns the truth value of (x >= y) element\-wise. |
| GuaranteeConst | array\_ops | Gives a guarantee to the TF runtime that the input tensor is a constant. |
| HistogramFixedWidth | math\_ops | Return histogram of values. |
| Identity | array\_ops | Return a tensor with the same shape and contents as the input tensor or value. |
| IdentityN | array\_ops | Returns a list of tensors with the same shapes and contents as the input. |
| Igamma | math\_ops | Compute the lower regularized incomplete Gamma function P(a, x). |
| Igammac | math\_ops | Compute the upper regularized incomplete Gamma function Q(a, x). |
| IgammaGradA | math\_ops | \- |
| InplaceAdd | array\_ops | Adds v into specified rows of x. |
| InplaceSub | array\_ops | Subtracts v into specified rows of x. |
| InplaceUpdate | array\_ops | Updates specified rows with values in v. |
| InTopK | nn\_ops | Says whether the targets are in the top K predictions. |
| InTopKV2 | nn\_ops | Says whether the targets are in the top K predictions. |
| Inv | math\_ops | Computes the reciprocal of x element\-wise. |
| Invert | bitwise\_ops | \- |
| InvertPermutation | array\_ops | Computes the inverse permutation of a tensor. |
| IsVariableInitialized | state\_ops | Checks whether a tensor has been initialized. |
| L2Loss | nn\_ops | L2 Loss. |
| Less | math\_ops | Returns the truth value of (x < y) element\-wise. |
| LessEqual | math\_ops | Returns the truth value of (x <= y) element\-wise. |
| LinSpace | math\_ops | Generates values in an interval. |
| ListDiff | array\_ops | \- |
| Log | math\_ops | Computes natural logarithm of x element\-wise. |
| Log1p | math\_ops | Computes natural logarithm of (1 + x) element\-wise. |
| LogicalAnd | math\_ops | Returns the truth value of x AND y element\-wise. |
| LogicalNot | math\_ops | Returns the truth value of NOT x element\-wise. |
| LogicalOr | math\_ops | Returns the truth value of x OR y element\-wise. |
| LogMatrixDeterminant | linalg\_ops | \- |
| LogSoftmax | nn\_ops | Computes log softmax activations. |
| LoopCond | control\_flow\_ops | Forwards the input to the output. |
| LowerBound | array\_ops | \- |
| LRN | nn\_ops | Local Response Normalization. |
| MatMul | math\_ops | Multiply the matrix "a" by the matrix "b". |
| MatrixBandPart | array\_ops | Copy a tensor setting everything outside a central band in each innermost matrix. |
| MatrixDeterminant | linalg\_ops | \- |
| MatrixDiag | array\_ops | Returns a batched diagonal tensor with a given batched diagonal values. |
| MatrixDiagPart | array\_ops | Returns the batched diagonal part of a batched tensor. |
| MatrixInverse | linalg\_ops | \- |
| MatrixSetDiag | array\_ops | Returns a batched matrix tensor with new batched diagonal values. |
| MatrixSolve | linalg\_ops | \- |
| MatrixSolveLs | linalg\_ops | \- |
| MatrixTriangularSolve | linalg\_ops | \- |
| Max | math\_ops | Computes the maximum of elements across dimensions of a tensor. |
| Maximum | math\_ops | Returns the max of x and y. |
| MaxPool | nn\_ops | Performs max pooling on the input. |
| MaxPoolV2 | nn\_ops | Performs max pooling on the input. |
| MaxPool3D | nn\_ops | Performs 3D max pooling on the input. |
| MaxPoolWithArgmax | nn\_ops | Performs max pooling on the input and outputs both max values and indices. |
| Mean | math\_ops | Computes the mean of elements across dimensions of a tensor. |
| Merge | control\_flow\_ops | Forwards the value of an available tensor from inputs to output. |
| Min | math\_ops | Computes the minimum of elements across dimensions of a tensor. |
| Minimum | math\_ops | Returns the min of x and y |
| MirrorPad | array\_ops | Pads a tensor with mirrored values. |
| MirrorPadGrad | array\_ops | \- |
| Mod | math\_ops | Returns element\-wise remainder of division. |
| Mul | math\_ops | \- |
| Multinomial | random\_ops | Draws samples from a multinomial distribution. |
| Neg | math\_ops | \- |
| NextIteration | control\_flow\_ops | Makes its input available to the next iteration. |
| NoOp | no\_op | Does nothing. |
| NotEqual | math\_ops | Returns the truth value of (x != y) element\-wise. |
| NthElement | nn\_ops | Finds values of the n\-th order statistic for the last dimension. |
| OneHot | array\_ops | Returns a one\-hot tensor. |
| OnesLike | array\_ops | Returns a tensor of ones with the same shape and type as x. |
| Pack | array\_ops | \- |
| Pad | array\_ops | \- |
| ParallelConcat | array\_ops | \- |
| ParameterizedTruncatedNormal | random\_ops | Outputs random values from a normal distribution. |
| Placeholder | array\_ops | \- |
| PlaceholderWithDefault | array\_ops | \- |
| PopulationCount | bitwise\_ops | \- |
| Pow | math\_ops | Computes the power of one value to another. |
| PreventGradient | array\_ops | \- |
| Prod | math\_ops | Computes the product of elements across dimensions of a tensor. |
| Qr | linalg\_ops | \- |
| RandomGamma | random\_ops | Outputs random values from the Gamma distribution(s) described by alpha. |
| RandomGammaGrad | random\_ops | \- |
| RandomShuffle | random\_ops | Randomly shuffles a tensor along its first dimension. |
| RandomStandardNormal | random\_ops | \- |
| RandomUniform | random\_ops | Outputs random values from a uniform distribution. |
| Range | math\_ops | Creates a sequence of numbers. |
| RandomUniformInt | random\_ops | Outputs random integers from a uniform distribution. |
| Rank | array\_ops | Returns the rank of a tensor. |
| ReadVariableOp | resource\_variable\_ops | \- |
| RealDiv | math\_ops | Returns x / y element\-wise for real types. |
| Reciprocal | math\_ops | Computes the reciprocal of x element\-wise. |
| RefEnter | control\_flow\_ops | \- |
| RefExit | control\_flow\_ops | \- |
| RefMerge | control\_flow\_ops | \- |
| RefNextIteration | control\_flow\_ops | Makes its input available to the next iteration. |
| RefSwitch | control\_flow\_ops | Forwards the ref tensor data to the output port determined by pred. |
| Relu | nn\_ops | Computes rectified linear: max(features, 0). |
| Relu6 | nn\_ops | Computes rectified linear 6: min(max(features, 0), 6). |
| Reshape | array\_ops | Reshapes a tensor. |
| ReverseSequence | array\_ops | Reverses variable length slices. |
| ReverseV2 | array\_ops | \- |
| RightShift | bitwise\_ops | \- |
| Rint | math\_ops | Returns element\-wise integer closest to x. |
| Round | math\_ops | Rounds the values of a tensor to the nearest integer, element\-wise. |
| Rsqrt | math\_ops | Computes reciprocal of square root of x element\-wise. |
| SegmentMax | math\_ops | Computes the maximum along segments of a tensor. |
| Select | math\_ops | \- |
| SELU | nn\_ops | Computes scaled exponential linear: scale \* alpha \* (exp(features) \- 1). |
| Shape | array\_ops | Returns the shape of a tensor. |
| ShapeN | array\_ops | Returns shape of tensors. |
| Sigmoid | math\_ops | Computes sigmoid of x element\-wise. |
| Sign | math\_ops | Returns an element\-wise indication of the sign of a number. |
| Sin | math\_ops | Computes sin of x element\-wise. |
| Sinh | math\_ops | Computes hyperbolic sine of x element\-wise. |
| Size | array\_ops | Returns the size of a tensor. |
| Slice | array\_ops | Return a slice from 'input'. |
| Snapshot | array\_ops | Returns a copy of the input tensor. |
| Softmax | nn\_ops | Computes softmax activations. |
| Softplus | nn\_ops | Computes softplus: log(exp(features) + 1). |
| Softsign | nn\_ops | Computes softsign: features / (abs(features) + 1). |
| SpaceToBatch | array\_ops | SpaceToBatch for 4\-D tensors of type T. |
| SpaceToBatchND | array\_ops | SpaceToBatch for N\-D tensors of type T. |
| SpaceToDepth | array\_ops | SpaceToDepth for tensors of type T. |
| Split | array\_ops | Splits a tensor into num\_split tensors along one dimension. |
| SplitV | array\_ops | Splits a tensor into num\_split tensors along one dimension. |
| Sqrt | math\_ops | Computes square root of x element\-wise. |
| Square | math\_ops | Computes square of x element\-wise. |
| SquaredDifference | math\_ops | Returns (x \- y)(x \- y) element\-wise. |
| Squeeze | array\_ops | Removes dimensions of size 1 from the shape of a tensor. |
| StatelessMultinomial | stateless\_random\_ops | \- |
| StopGradient | array\_ops | Stops gradient computation. |
| StridedSlice | array\_ops | Return a strided slice from input. |
| Sub | math\_ops | \- |
| Sum | math\_ops | Computes the sum of elements across dimensions of a tensor. |
| Svd | linalg\_ops | \- |
| Switch | control\_flow\_ops | Forwards data to the output port determined by pred. |
| Tan | math\_ops | Computes tan of x element\-wise. |
| Tanh | math\_ops | Computes hyperbolic tangent of x element\-wise. |
| Tile | array\_ops | Constructs a tensor by tiling a given tensor. |
| TopK | nn\_ops | Finds values and indices of the k largest elements for the last dimension. |
| TopKV2 | nn\_ops | \- |
| Transpose | array\_ops | Shuffle dimensions of x according to a permutation. |
| TruncateDiv | math\_ops | Returns x / y element\-wise for integer types. |
| TruncatedNormal | random\_ops | Outputs random values from a truncated normal distribution. |
| TruncateMod | math\_ops | Returns element\-wise remainder of division. |
| Unbatch | batch\_ops | \- |
| UnbatchGrad | batch\_ops | \- |
| Unique | array\_ops | Finds unique elements in a 1\-D tensor. |
| UniqueWithCounts | array\_ops | Finds unique elements in a 1\-D tensor. |
| Unpack | array\_ops | \- |
| UnravelIndex | array\_ops | Converts a flat index or array of flat indices into a tuple of. |
| UnsortedSegmentMin | math\_ops | Computes the minimum along segments of a tensor. |
| UnsortedSegmentProd | math\_ops | Computes the product along segments of a tensor. |
| UnsortedSegmentSum | math\_ops | Computes the sum along segments of a tensor. |
| UpperBound | array\_ops | \- |
| Variable | state\_ops | Holds state in the form of a tensor that persists across steps. |
| Where | array\_ops | Returns locations of nonzero / true values in a tensor. |
| Xdivy | math\_ops | Returns 0 if x == 0, and x / y otherwise, elementwise. |
| Xlogy | math\_ops | Returns 0 if x == 0, and x \* log(y) otherwise, elementwise. |
| ZerosLike | array\_ops | Returns a tensor of zeros with the same shape and type as x. |
| Zeta | math\_ops | Compute the Hurwitz zeta function \((x, q)\). |
| \_Retval | function\_ops | \- |
| LeakyRelu | nn\_ops | \- |
| FusedBatchNormV3 | nn\_ops/mkl\_nn\_ops | \- |
