This is a list of layers that can be converted with the CV tool.
Models consisting only of layers included in this list can be converted.
Table of contents
Caffe
Support version
V1.0
Support Layer
Caffe Layer Type | Comments |
---|---|
Convolution |
|
Deconvolution |
|
Pooling - MAX, AVG |
|
Crop |
|
InnerProduct |
|
LRN |
|
BatchNormalization |
|
ReLU |
|
Leaky-ReLU |
|
PReLU |
|
ELU |
|
Sigmoid |
|
TanH |
|
AbsVal |
|
Bias |
|
Scale |
|
Power |
|
Exp |
|
Log |
|
BNLL |
|
Flatten |
|
Reshape |
|
Concat |
|
Eltwise - SUM |
|
Eltwise - MAX |
|
Eltwise - PROD |
|
Reduction - SUM |
|
Reduction - MEAN |
|
Reduction - ASUM |
|
Reduction - SUMSQ |
|
Softmax |
|
Input |
|
Split | Parser maps output to input |
Slice |
|
ArgMax | Only K=1 is supported. |
Dropout | Parser maps output to input |
Tensorflow
Support version
V1.10.1 ~
Support Layer
TensorFlow Op Type | TensorFlow Function | Comments |
---|---|---|
MatMul, BatchMatMulV2 | tf.linalg.matmul tf.matmul | adjoint_a, adjoint_b, a_is_sparse, b_is_sparse not supported |
AvgPool | tf.nn.avg_pool |
|
MaxPool | tf.nn.max_pool |
|
Conv2D | tf.nn.conv2d | Filter has to be constant |
DepthwiseConv2dNative | tf.nn.depthwise_conv2d |
|
Conv2DBackpropInput | tf.nn.conv2d_backprop_input | Assumptions:
|
Conv2DBackpropFilter | tf.nn.conv2d_backprop_filter | Assumptions:
|
LRN | tf.nn.local_response_normalization |
|
Softmax | tf.nn.softmax |
|
Reshape | tf.reshape | Pre- and Post- transpose ops are added in case reshape involves depth dim |
Sigmoid | tf.sigmoid |
|
Tanh | tf.nn.tanh |
|
| tf.nn.atrous_conv2d | Expands to SpaceToBatchND-> Conv2D -> BatchToSpaceND |
SpaceToBatchND | tf.space_to_batch_nd | [SpaceToBatchND -> Conv2D -> BatchToSpaceND] works |
BatchToSpaceND | tf.batch_to_space_nd | [SpaceToBatchND -> Conv2D -> BatchToSpaceND] works |
Const | tf.constant |
|
Placeholder | tf.placeholder |
|
Max | tf.reduce_max | keepdims supported using transpose node |
Min | tf.reduce_min | keepdims supported using transpose node |
Sum | tf.reduce_sum | keepdims supported using transpose node |
Prod | tf.reduce_prod | keepdims supported using transpose node |
Mean | tf.reduce_mean | keepdims supported using transpose node |
Squeeze | tf.squeeze | axis parameter not supported |
BatchNorm | tf.nn.batch_normalization |
|
FusedBatchNorm | tf.nn.fused_batch_norm |
|
Relu | tf.nn.relu |
|
Elu | tf.nn.elu |
|
Relu6 | tf.nn.relu6 |
|
LeakyRelu | tf.nn.leaky_relu |
|
Concat | tf.concat |
|
ConcatV2 | tf.concatv2 |
|
Add | tf.add |
|
BiasAdd | tf.nn.bias_add |
|
AddN | tf.addn |
|
Sub | tf.subtract |
|
Abs | tf.abs |
|
Neg | tf.negative |
|
Ceil | tf.ceil |
|
Floor | tf.floor |
|
Exp | tf.exp |
|
Log | tf.log |
|
Reciprocal | tf.reciprocal |
|
Pow | tf.pow |
|
Mul | tf.multiply |
|
Square | tf.square |
|
Sqrt | tf.sqrt |
|
Rsqrt | tf.rqrt |
|
Div | tf.div |
|
TrueDiv | tf.truediv |
|
RealDiv | tf.realdiv |
|
Divide | tf.divide |
|
Maximum | tf.maximum |
|
Minimum | tf.minimum |
|
Pad, MirrorPad | tf.pad | Limited support. |
Transpose | tf.transpose | conjugate = True not supported |
ResizeBilinear | tf.image.resize_bilinear |
|
ResizeNearestNeighbor | tf.image.resize_nearest_neighbor | align_corners = True not supported half_center_pixels = True not supported |
Resamp | tf.contrib.resampler |
|
Slice | tf.slice | begin and size dtype int64 not supported |
StridedSlice | tf.strided_slice |
|
Split, SplitV | tf.split | only "num_split" attr is supported |
ArgMin | tf.argmin |
|
ArgMax | tf.argmax |
|
OneHot | tf.one_hot |
|
SquaredDifference | tf.squared_difference |
|
Pack | tf.stack |
|
Unpack | tf.unstack |
|
Range | tf.range |
|
ClipByValue | tf.clip_by_value |
|
ScatterND | tf.scatter_nd | Duplicate indices values will be overwritten to the last index value. |
Gather | tf.gather | Only axis = 0 is supported |
| tf.nn.l2_normalize | Expands to math operators |
TopKV2 | tf.math.top_k |
|
Cast | tf.dtypes.saturate_cast | tf.cast might fail. |
ZerosLike | tf.zeros_like |
|
OnesLike | tf.ones_like |
|
Tile | tf.tile |
|
Softplus | tf.math.softplus |
|
Identity | tf.identity |
|
ExpandDims | tf.expand_dims |
|
FakeQuantWithMinMaxArgs | tf.fake_quant_with_min_max_args |
|
FakeQuantWithMinMaxVars | tf.fake_quant_with_min_max_vars |
|
Shape | tf.Shape |
|
CheckNumerics | tf.check_numerics |
|
NoOp | tf.no_op |
|
Assert | tf.Assert |
|
Mish |
|
|
Swish |
|
|
Sign | tf.math.sign |
|
Level Curve | Custom op |
|
FloorMod | tf.math.floormod |
Tensorflow Lite
Support version
V1.10.1 ~
Support Layer
TFLite Op | TensorFlow API | Comments |
---|---|---|
ADD | tf.add |
|
AVERAGE_POOL_2D | tf.nn.avg_pool |
|
BATCH_TO_SPACE | tf.batch_to_space | SpaceToBatch -> Conv -> BatchToSpace patterns are detected and fused into Conv primitive. |
CAST | tf.identity | Optimized during conversion to protobuf |
CONCATENATION | tf.concat |
|
CONV_2D | tf.nn.conv2d | Filter has to be constant. Use surgery with ConstantifyShapes to make it constant |
DENSIFY | tf.Variable | Optimized during conversion to protobuf |
DEPTHWISE_CONV_2D | tf.nn.depthwise_conv2d |
|
DEPTH_TO_SPACE | tf.nn.depth_to_space | Evaluates to multiple reshape and transpose SGL nodes |
DEQUANTIZE | tf.identity | Optimized during conversion to protobuf |
DIV | tf.divide |
|
EXP | tf.exp |
|
EXPAND_DIMS | tf.expand_dims | Parser maps output to input |
FAKE_QUANT | tf.quantization.fake_quant_with_min_max_vars | Parser maps output to input with quantization information captured. |
FULLY_CONNECTED | tf.matmul | adjoint_a, adjoint_b, a_is_sparse, b_is_sparse not supported |
IDENTITY | tf.identity | Optimized during conversion to protobuf |
LEAKY_RELU | tf.nn.leaky_relu |
|
LOG | tf.math.log |
|
LOGISTIC | tf.sigmoid |
|
MAXIMUM | tf.maximum |
|
MAX_POOL_2D | tf.nn.max_pool |
|
MEAN | tf.reduce_mean |
|
MINIMUM | tf.minimum |
|
MUL | tf.multiply |
|
NEG | tf.math.negative |
|
PACK | tf.stack |
|
PAD | tf.pad |
|
PRELU | - | This op is exanded to Relu,Neg,Mul, Add in protobuf. Parser groups them into Prelu SGL |
QUANTIZE | tf.identity | Optimized during conversion to protobuf |
REDUCE_MAX | tf.reduce_max |
|
REDUCE_MIN | tf.reduce_min |
|
RELU | tf.nn.relu |
|
RELU6 | tf.nn.relu6 |
|
RESHAPE | tf.reshape |
|
RESIZE_BILINEAR | tf.image.resize_bilinear |
|
RESIZE_NEAREST_NEIGHBOR | tf.image.resize_nearest_neighbor |
|
SHAPE | tf.Shape | Shape values are computed in first pass of parser |
SLICE | tf.slice |
|
SOFTMAX | tf.nn.softmax |
|
SPACE_TO_BATCH | tf.space_to_batch | SpaceToBatch -> Conv -> BatchToSpace patterns are detected and fused into Conv primitive. |
SPLIT | tf.split |
|
SPLIT_V | tf.split |
|
SQUEEZE | tf.squeeze |
|
STRIDED_SLICE | tf.strided_slice |
|
SUB | tf.subtract |
|
SUM | tf.reduce_sum |
|
TANH | tf.math.tanh |
|
TRANSPOSE | tf.transpose |
|
TRANSPOSE_CONV | tf.nn.conv2d_transpose | Assumptions:
_sizes tensor
|
UNPACK | tf.unstack |
|
ONNX
Support version
V1.3.0 ~ V1.6
Support Layer
Operator | Operator | Comments |
---|---|---|
Add | 1,6,7,13,14 |
|
Abs | 1,6 |
|
ArgMax | 1,11,12,13 | Since operator set 12, the 'select_last_index' attribute must be 0. |
ArgMin | 1,11,12,13 | Since operator set 12, the 'select_last_index' attribute must be 0. |
AveragePool | 1,7,10,11 |
|
BatchNormalization | 1,6,7,9 |
|
Cast | 1,6,9 | Passthrough. |
Constant | 1,9,11 |
|
*ConstantOfShape | 9 | All inputs must be constants. |
Conv | 1,11 | All inputs except for 'X' must be constants. Supports up to 3 spatial dimensions. |
ConvTranspose | 1,11 | All inputs except for 'X' must be constants. Supports up to 3 spatial dimensions. |
Ceil | 1,6 |
|
Concat | 1,4,11,13 |
|
Clip | 1,6,11,12,13 |
|
CumSum | 11,14 | All inputs except for 'x' must be constants. |
DepthToSpace | 1,11,13 |
|
DequantizeLinear | 10 | All inputs except for 'x' must be constants. |
Div | 1,6,7,13,14 |
|
Dropout | 1,6,7,10 | Passthrough. |
Elu | 1,6 |
|
Equal | 1,7,11,13 |
|
Erf | 9,13 |
|
Exp | 1,6 |
|
Expand | 8 ,13 |
|
Flatten | 1,9,11,13 |
|
Floor | 1,6 |
|
Gather | 1,11 ,13 | 'indices' input must be a constant. |
GatherElements | 11 | 'indices' input must be a constant. |
GatherND | 11,12,13 | 'indices' input must be a constant. Since operator set 12, the 'batch_dims' attribute must be 0. |
Gemm | 1,6,7,9,11,13 | 'C' input must be a constant. |
GlobalAveragePool | 1 |
|
GlobalMaxPool | 1 |
|
Greater | 1,7,9,13 |
|
GreaterOrEqual | 12,16 |
|
HardSigmoid | 1,6 |
|
Identity | 1 | Passthrough. |
InstanceNormalization | 1,6 |
|
LeakyRelu | 1,6 |
|
Less | 1,7,9,13 |
|
LessOrEqual | 12,16 |
|
Log | 1,6 |
|
LRN | 1 |
|
MatMul | 1,9 |
|
Max | 1,6,8,12,13 |
|
MaxPool | 1,8,10,11,12 |
|
Mean | 1,6,8 |
|
Min | 1,6,8,12,13 |
|
Mul | 1,6,7 |
|
Neg | 1,6 |
|
OneHot | 9,11 |
|
Pad | 1,2,11,13 | The 'mode' attribute cannot be 'reflect'. If the 'mode' attribute is 'constant', padding value must be 0. Since operator set 11, all inputs except for 'data' must be constants. |
Pow | 1,7,12,13,15 |
|
PRelu | 1,6,7,9 |
|
QLinearConv | 10 | All inputs except for 'x' must be constants. Supports up to 3 spatial dimensions. |
QLinearMatMul | 10 | All inputs except for 'a' and 'b' must be constants. |
QuantizeLinear | 10 | All inputs except for 'x' must be constants. |
RandomUniform | 1 |
|
Reshape | 1,5,13 | Since operator set 5, the 'shape' input should be a constant. |
Reciprocal | 1,6 |
|
Relu | 1,6,13,14 |
|
ReduceL1 | 1,11,13 |
|
ReduceL2 | 1,11,13 |
|
ReduceLogSumExp | 1,11 |
|
ReduceMax | 1,11 |
|
ReduceMean | 1,11 |
|
ReduceMin | 1,11 |
|
ReduceProd | 1,11 |
|
ReduceSum | 1,11 |
|
Resize | 10,11 | All inputs except for 'x' must be constants. |
Round | 11 | By default, halfs are rounded towards positive infinity. Rounding halfs to the nearest even integer is only supported in CV3. |
ScatterElements | 11 | 'indices' input must be a constant. |
ScatterND | 11 | 'indices' input must be a constant. |
Selu | 1,6 |
|
*Shape | 1 | 'data' input must have constant shape. |
Sigmoid | 1,6 |
|
Slice | 1,10,11,13 | All inputs except for 'data' must be constants. |
Softmax | 1,11 |
|
Softplus | 1 |
|
Split | 1,2,11,13 | All inputs except for 'input' must be constants. |
Sqrt | 1,6 |
|
Squeeze | 1,11,13 | Since operator set 13, the 'axes' input tensor must be a constant if it is specified. |
Sub | 1,6,7 |
|
Sum | 1,6,8 |
|
Tanh | 1,6 |
|
Tile | 1,6 |
|
TopK | 1,10,11 |
|
Transpose | 1,13 |
|
Upsample | 7,9 | All inputs except for 'X' must be constants. |
Unsqueeze | 1,11 |
|
Where | 9,16 | 'condition' input must be constant. |