TensorFlow互換状況

Thursday, November 07, 2019

Uncategorized

Posted by Shinichiro Takahashi

※当ページの情報はソニーでの動作確認結果をもとに掲載していますが、動作保証をするものではありませんので、ご注意ください。

・レイヤー

  ・TensorFlowからNeural Network Consoleへのインポート

  ・Neural Network ConsoleからTensorFlowへのエクスポート

 

・サンプル

  ・TensorFlowサンプルのNeural Network Consoleへのインポート

  ・Neural Network ConsoleサンプルのTensorFlowへのエクスポート

 

・TensorFlowからNeural Network Consoleへのインポート

  ✓:動作確認済み

  △:一部制限有り

  ブランク:未実装もしくは動作確認NG

 

TensorFlowレイヤー名 ステータス 対応するNNCのレイヤー名 備考
Abs Abs
Acos ACos
Acosh ACosh
Add Add2
AddN Add2
All
Any
ArgMax Max
ArgMin Min
Asin ASin
Asinh ASinh
Atan ATan
Atan2
Atanh ATanh
AvgPool AveragePooling, Transpose, Pad padのエッジモードなど、一部の機能はNNCでサポートされていません。
AvgPool3D
BatchMatMul BatchMatmul, Transpose
BiasAdd Add2, Reshape
Cast
Ceil Ceil
ConcatV2 Concatenate
Const Add2
Conv2D
Conv2DBackpropFilter
Conv2DBackpropInput
Conv3D
Conv3DBackpropFilterV2
Conv3DBackpropInputV2
Cos Cos
Cosh Cosh
DepthToSpace
DepthwiseConv2dNative
DepthwiseConv2d

NativeBackpropFilter

DepthwiseConv2d

NativeBackpropInput

Div Div2
Elu ELU
Equal Equal
Erf
Erfc
Exp Exp
ExpandDims Reshape
Fill
Flatten Reshape
Floor Floor
FloorDiv Div2, Floor
FloorMod Div2, Floor, Sub2, Mul2
FusedBatchNorm
GatherNd
GatherV2
Greater Greater
GreaterEqual Less, LogicalNot
Identity Identity
IsInf
IsNan
LeakyRelu LeakyReLU
Less Less
LessEqual Greater, LogicalNot
Log Log
LogSoftmax
LogicalAnd LogicalAnd
LogicalNot LogicalNot
LogicalOr LogicalOr
LogicalXor LogicalOr, LogicalAnd, LogicalNot
MatrixBandPart
Max Max
MaxPool Transpose, Pad, MaxPooling
MaxPool3D
MaxPoolWithArgmax
Maximum Maximum2
Mean Mean
Min Min
Minimum Minimum2
Mul Mul2
Neg MulScalar
NotEqual Equal, LogicalNot
OneHot
Pack Concatenate, Reshape
Pad Pad
Pow Pow2
Prod Prod
RandomShuffle
RandomStandardNormal
RandomUniform
RealDiv Div2
Reciprocal RDivScalar
Relu ReLU
Relu6 MinimumScalar, MaximumScalar
Reshape
ReverseSequence
Rsqrt PowScalar, RDivScalar
Select
Selu SELU
Shape
Sigmoid Sigmoid
Sign Sign
Sin Sin
Sinh Sinh
Size
Slice Slice
Softmax
Softplus AddScalar, Log, Exp
Softsign Abs, AddScalar, Div2
SpaceToDepth
SplitV
Sqrt PowScalar
Square Mul2
SquaredDifference Sub2, Mul2
Squeeze Reshape
StopGradient Identity
StridedSlice Slice
Sub Sub2
Sum Sum
Tan Tan
Tanh Tanh
Tile Tile
TopKV2
Transpose Transpose
TruncateDiv
TruncateMod
Unpack Reshape, Split, Stack, Concatenate

 

・Neural Network ConsoleからTensorFlowへのエクスポート

  ✓:動作確認済み

  △:一部制限有り

  ブランク:未実装もしくは動作確認NG

NNCレイヤー名 ステータス 対応するTensorFlowのレイヤー名 備考
Abs Abs, Placeholder
AbsoluteError
ACos Placeholder, Acos
ACosh Acosh, Placeholder
Add2 Add, Placeholder
AddScalar Const, Add, Placeholder
Affine Mul, Const, Reshape, Placeholder, MatMul, Add
ASin Asin, Placeholder
ASinh Asinh, Placeholder
ATan Atan, Placeholder
ATan2 RealDiv, Placeholder, Atan
ATanh Atanh, Placeholder
AveragePooling AvgPool, Const, Reshape, Placeholder, Transpose, AvgPool3D, Pad 現在、ignore_borderとinclude_padの両方がTrueの場合のみをサポートしています。
BatchMatmul Const, Reshape, Placeholder, Transpose, BatchMatMulV2
BatchNormalization Mul, Const, Mean, Reshape, Rsqrt, Sub, Placeholder, Add, StopGradient, SquaredDifference 推論段階、caffe2 mistmatch onnx 1.4.xの実装では、「インプレース」機能を適用できません。
BinaryConnectAffine Mul, Const, Reshape, Placeholder, MatMul, Add
BinaryConnectConvolution Const, ConcatV2, Reshape, Identity, Split, Placeholder, Transpose, Add, Pad, Conv2D DilationとStrideが1より大きい場合はTensorFlowではサポートされていません。
BinaryCrossEntropy
BinaryError
BinarySigmoid Select, Const, Greater, Placeholder
BinaryTanh Select, Const, Greater, Placeholder
BinaryWeightAffine Mul, Const, Reshape, Placeholder, MatMul, Add
BinaryWeightConvolution Mul, Const, ConcatV2, Reshape, Identity, Split, Placeholder, Transpose, Add, Pad, Conv2D DilationとStrideが1より大きい場合はTensorFlowではサポートされていません。
Broadcast
BroadcastTo
CategoricalCrossEntropy
Ceil Ceil, Placeholder
CELU
ClipGradByNorm
ClipGradByValue
Concatenate ConcatV2, Placeholder, Const
Convolution ConcatV2, Const, Reshape, BatchToSpaceND, Identity, Split, Placeholder, SpaceToBatchND, Transpose, Add, Pad, Conv2D DilationとStrideが1より大きい場合はTensorFlowではサポートされていません。
Cos Cos, Placeholder
Cosh Cosh, Placeholder
CReLU
Deconvolution Const, ConcatV2, Conv2DBackpropInput, Slice, Reshape, Identity, Split, Placeholder, Transpose, Add Dilationが1より大きい場合はTensorFlowではサポートされていません。
DepthwiseConvolution ConcatV2, Const, Reshape, BatchToSpaceND, Split, Placeholder, SpaceToBatchND, Transpose, Add, Pad, Conv2D DilationとStrideが1より大きい場合はTensorFlowではサポートされていません。
DepthwiseDeconvolution ConcatV2, Const, Slice, Reshape, Conv2DBackpropInput, Split, Placeholder, Transpose, Add Dilationが1より大きい場合はTensorFlowではサポートされていません。
Div2 RealDiv, Placeholder
Dropout
ELU Less, Const, Mul, Exp, Cast, Sub, Placeholder, GreaterEqual, Add, Elu
Embed
EpsilonInsensitiveLoss
Equal Equal, Placeholder
EqualScalar
Exp Placeholder, Exp
FFT
FixedPointQuantize
Flip Const, Identity, Placeholder, Transpose, GatherV2
Floor Floor, Placeholder
FusedBatchNormalization
GELU
GlobalAveragePooling Const, Mean, Range, Sub, SplitV, Pack
Greater Greater, Placeholder
GreaterEqual
GreaterEqualScalar
GreaterScalar
HardSigmoid
HardTanh
HuberLoss
Identity Identity, Placeholder
IFFT
ImageAugmentation
Interpolate
KLMultinomial
LeakyReLU LeakyRelu, Placeholder
Less Less, Placeholder
LessEqual
LessEqualScalar
LessScalar
Log Log, Placeholder
LogicalAnd LogicalAnd, Placeholder
LogicalAndScalar
LogicalNot LogicalNot, Placeholder
LogicalOr LogicalOr, Placeholder
LogicalOrScalar
LogicalXor LogicalOr, LogicalAnd, LogicalNot, Placeholder
LogicalXorScalar
LogSigmoid
LSTM
MatrixDiag
MatrixDiagPart
Max Const, Max, Placeholder
Maximum2 Const, Placeholder, Add, Pack, Max
MaximumScalar Const, Placeholder, Add, Pack, Max
MaxPooling Const, MaxPool3D, PadV2, Reshape, Placeholder, Transpose, MaxPool
Mean Const, Mean, Placeholder
MeanSubtraction
Min Const, Min, Placeholder
Minimum2 Const, Min, Placeholder, Add, Pack
MinimumScalar Const, Min, Placeholder, Add, Pack
Mul2 Mul, Placeholder
MulScalar Mul, Const, Placeholder
NmsDetection2d
NotEqual
NotEqualScalar
OneHot
Pad MirrorPad, Const, PadV2, Placeholder パッドのモードが反映されている場合、パッドのサイズが入力サイズを超えると、TensorFlowでは処理できません。
Pow2 Pow, Placeholder
Pow2Quantize
PowScalar Const, Pow, Placeholder
PReLU Mul, Const, Reshape, Abs, Sub, Placeholder, Relu, Add
Prod Const, Prod, Placeholder
Prune
RandomCrop
RandomFlip
RandomShift
RDivScalar Const, RealDiv, Placeholder
ReLU Placeholder, Relu
ReLU6
Reshape Const, Reshape, Placeholder
Round
RPowScalar Const, Pow, Placeholder
RSubScalar Const, Sub, Placeholder
SELU Mul, Const, Minimum, Exp, Maximum, Sub, Placeholder, Add
Shift
Sigmoid Sigmoid, Placeholder
SigmoidCrossEntropy
Sign Sign, Placeholder
Sin Sin, Placeholder
Sinc
Sinh Sinh, Placeholder
Slice Const, Slice, Placeholder step!= 1″は、onnx opset 9の範囲を超えていますが、サポートされていません。
Softmax Const, Sum, Exp, Sub, Placeholder, RealDiv, Max
SoftmaxCrossEntropy
SoftPlus
SoftSign
Sort
SquaredError
Stack ExpandDims, ConcatV2, Placeholder, Const
Sub2 Sub, Placeholder
Sum Const, Sum, Placeholder
SumPooling AvgPool, Mul, Const, Reshape, Placeholder, Transpose, AvgPool3D, Pad
Swish
Tan Tan, Placeholder
Tanh Tanh, Placeholder
TanhShrink
Tile
TopKData
TopKGrad
TopNError
Transpose Transpose, Const, Placeholder
Unlink
Unpooling Mul, Const, Merge, Equal, Reshape, LogicalAnd, ResizeNearestNeighbor, Cast, Identity, Placeholder, StridedSlice, Transpose, Switch, NoOp, Assert カーネルは2dのみをサポートします。
VATNoise

 

・TensorFlowサンプルのNeural Network Consoleへのインポート

  ✓:動作確認済み

TensorFlowサンプル名 ステータス 備考
fc-layers_frozen

 

・Neural Network ConsoleサンプルのTensorFlowへのインポート

  ✓:動作確認済み

NNCサンプル名 ステータス 備考
01_logistic_regression
02_binary_cnn