onnx2tf 1.27.8__tar.gz → 1.27.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/PKG-INFO +33 -3
- onnx2tf-1.27.8/onnx2tf.egg-info/PKG-INFO → onnx2tf-1.27.9/README.md +32 -27
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/__init__.py +1 -1
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/onnx2tf.py +48 -6
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/utils/common_functions.py +113 -35
- onnx2tf-1.27.8/README.md → onnx2tf-1.27.9/onnx2tf.egg-info/PKG-INFO +57 -2
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/LICENSE +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/LICENSE_onnx-tensorflow +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/__main__.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Abs.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Acos.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Acosh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Add.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/And.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ArgMax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ArgMin.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Asin.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Asinh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Atan.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Atanh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/AveragePool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/BatchNormalization.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Bernoulli.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/BitShift.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Cast.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Ceil.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Celu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Clip.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Col2Im.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Compress.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Concat.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ConcatFromSequence.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Constant.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ConstantOfShape.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Conv.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ConvInteger.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ConvTranspose.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Cos.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Cosh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/CumSum.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/DepthToSpace.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/DequantizeLinear.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Det.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Div.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Dropout.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/DynamicQuantizeLinear.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Einsum.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Elu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Equal.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Erf.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Exp.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Expand.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/EyeLike.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Flatten.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Floor.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/FusedConv.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GRU.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Gather.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GatherElements.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GatherND.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Gelu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Gemm.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GlobalAveragePool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GlobalLpPool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GlobalMaxPool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Greater.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GreaterOrEqual.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GridSample.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/GroupNorm.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/HammingWindow.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/HannWindow.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/HardSigmoid.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/HardSwish.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Hardmax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Identity.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/If.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Input.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/InstanceNormalization.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Inverse.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/IsInf.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/IsNaN.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LRN.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LSTM.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LayerNormalization.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LeakyRelu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Less.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LessOrEqual.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Log.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LogSoftmax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/LpNormalization.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MatMul.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MatMulInteger.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Max.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MaxPool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MaxUnpool.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Mean.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MeanVarianceNormalization.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/MelWeightMatrix.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Min.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Mish.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Mod.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Mul.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Multinomial.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Neg.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/NonMaxSuppression.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/NonZero.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Not.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/OneHot.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/OptionalGetElement.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/OptionalHasElement.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Or.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/PRelu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Pad.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Pow.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearAdd.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearConcat.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearConv.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearLeakyRelu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearMatMul.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearMul.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearSigmoid.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QLinearSoftmax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/QuantizeLinear.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RNN.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RandomNormal.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RandomNormalLike.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RandomUniform.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RandomUniformLike.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Range.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Reciprocal.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceL1.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceL2.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceLogSum.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceLogSumExp.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceMax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceMean.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceMin.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceProd.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceSum.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReduceSumSquare.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Relu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Reshape.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Resize.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ReverseSequence.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/RoiAlign.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Round.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/STFT.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ScaleAndTranslate.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Scatter.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ScatterElements.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ScatterND.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Selu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceAt.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceConstruct.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceEmpty.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceErase.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceInsert.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SequenceLength.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Shape.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Shrink.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sigmoid.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sign.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sin.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sinh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Size.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Slice.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Softmax.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Softplus.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Softsign.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SpaceToDepth.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Split.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/SplitToSequence.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sqrt.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Squeeze.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/StringNormalizer.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sub.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Sum.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Tan.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Tanh.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/ThresholdedRelu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Tile.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/TopK.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Transpose.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Trilu.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Unique.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Unsqueeze.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Upsample.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Where.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/Xor.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/_Loop.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/__Loop.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/ops/__init__.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/utils/__init__.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/utils/enums.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf/utils/logging.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf.egg-info/SOURCES.txt +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf.egg-info/dependency_links.txt +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf.egg-info/entry_points.txt +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/onnx2tf.egg-info/top_level.txt +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/setup.cfg +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/setup.py +0 -0
- {onnx2tf-1.27.8 → onnx2tf-1.27.9}/tests/test_model_convert.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onnx2tf
|
|
3
|
-
Version: 1.27.
|
|
3
|
+
Version: 1.27.9
|
|
4
4
|
Summary: Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
|
|
5
5
|
Home-page: https://github.com/PINTO0309/onnx2tf
|
|
6
6
|
Author: Katsuya Hyodo
|
|
@@ -334,7 +334,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
334
334
|
docker run --rm -it \
|
|
335
335
|
-v `pwd`:/workdir \
|
|
336
336
|
-w /workdir \
|
|
337
|
-
ghcr.io/pinto0309/onnx2tf:1.27.
|
|
337
|
+
ghcr.io/pinto0309/onnx2tf:1.27.9
|
|
338
338
|
|
|
339
339
|
or
|
|
340
340
|
|
|
@@ -342,7 +342,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
342
342
|
docker run --rm -it \
|
|
343
343
|
-v `pwd`:/workdir \
|
|
344
344
|
-w /workdir \
|
|
345
|
-
docker.io/pinto0309/onnx2tf:1.27.
|
|
345
|
+
docker.io/pinto0309/onnx2tf:1.27.9
|
|
346
346
|
|
|
347
347
|
or
|
|
348
348
|
|
|
@@ -1747,6 +1747,21 @@ optional arguments:
|
|
|
1747
1747
|
Numerical values other than dynamic dimensions are ignored.
|
|
1748
1748
|
Ignores --batch_size if specified at the same time as --batch_size.
|
|
1749
1749
|
|
|
1750
|
+
-sh SHAPE_HINTS [SHAPE_HINTS ...], \
|
|
1751
|
+
--shape_hints SHAPE_HINTS [SHAPE_HINTS ...]
|
|
1752
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
1753
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
1754
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
1755
|
+
the ONNX input shape with a static shape.
|
|
1756
|
+
The format is
|
|
1757
|
+
"i1:dim0,...,dimN" "i2:dim0,...,dimN" "i3:dim0,...,dimN"
|
|
1758
|
+
When there is only one input, for example,
|
|
1759
|
+
"data:1,3,224,224"
|
|
1760
|
+
When there are multiple inputs, for example,
|
|
1761
|
+
"data1:1,3,224,224" "data2:1,3,112" "data3:5"
|
|
1762
|
+
A value of 1 or more must be specified.
|
|
1763
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
1764
|
+
|
|
1750
1765
|
-nlt, --no_large_tensor
|
|
1751
1766
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
1752
1767
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -2052,6 +2067,7 @@ convert(
|
|
|
2052
2067
|
not_use_opname_auto_generate: Optional[bool] = False,
|
|
2053
2068
|
batch_size: Union[int, NoneType] = None,
|
|
2054
2069
|
overwrite_input_shape: Union[List[str], NoneType] = None,
|
|
2070
|
+
shape_hints: Union[List[str], NoneType] = None,
|
|
2055
2071
|
no_large_tensor: Optional[bool] = False,
|
|
2056
2072
|
output_nms_with_dynamic_tensor: Optional[bool] = False,
|
|
2057
2073
|
switch_nms_version: Optional[str] = 'v4',
|
|
@@ -2244,6 +2260,20 @@ convert(
|
|
|
2244
2260
|
Numerical values other than dynamic dimensions are ignored.
|
|
2245
2261
|
Ignores batch_size if specified at the same time as batch_size.
|
|
2246
2262
|
|
|
2263
|
+
shape_hints: Optional[List[str]]
|
|
2264
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
2265
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
2266
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
2267
|
+
the ONNX input shape with a static shape.
|
|
2268
|
+
The format is
|
|
2269
|
+
['i1:dim0,...,dimN', 'i2:dim0,...,dimN', 'i3:dim0,...,dimN']
|
|
2270
|
+
When there is only one input, for example,
|
|
2271
|
+
['data:1,3,224,224']
|
|
2272
|
+
When there are multiple inputs, for example,
|
|
2273
|
+
['data1:1,3,224,224', 'data2:1,3,112', 'data3:5']
|
|
2274
|
+
A value of 1 or more must be specified.
|
|
2275
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
2276
|
+
|
|
2247
2277
|
no_large_tensor: Optional[bool]
|
|
2248
2278
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
2249
2279
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: onnx2tf
|
|
3
|
-
Version: 1.27.8
|
|
4
|
-
Summary: Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
|
|
5
|
-
Home-page: https://github.com/PINTO0309/onnx2tf
|
|
6
|
-
Author: Katsuya Hyodo
|
|
7
|
-
Author-email: rmsdh122@yahoo.co.jp
|
|
8
|
-
License: MIT License
|
|
9
|
-
Platform: linux
|
|
10
|
-
Platform: unix
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
License-File: LICENSE_onnx-tensorflow
|
|
15
|
-
Dynamic: author
|
|
16
|
-
Dynamic: author-email
|
|
17
|
-
Dynamic: description
|
|
18
|
-
Dynamic: description-content-type
|
|
19
|
-
Dynamic: home-page
|
|
20
|
-
Dynamic: license
|
|
21
|
-
Dynamic: license-file
|
|
22
|
-
Dynamic: platform
|
|
23
|
-
Dynamic: requires-python
|
|
24
|
-
Dynamic: summary
|
|
25
|
-
|
|
26
1
|
# onnx2tf
|
|
27
2
|
Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in [onnx-tensorflow](https://github.com/onnx/onnx-tensorflow) ([onnx-tf](https://pypi.org/project/onnx-tf/)). I don't need a Star, but give me a pull request. Since I am adding challenging model optimizations and fixing bugs almost daily, I frequently embed potential bugs that would otherwise break through CI's regression testing. Therefore, if you encounter new problems, I recommend that you try a package that is a few versions older, or try the latest package that will be released in a few days.
|
|
28
3
|
|
|
@@ -334,7 +309,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
334
309
|
docker run --rm -it \
|
|
335
310
|
-v `pwd`:/workdir \
|
|
336
311
|
-w /workdir \
|
|
337
|
-
ghcr.io/pinto0309/onnx2tf:1.27.
|
|
312
|
+
ghcr.io/pinto0309/onnx2tf:1.27.9
|
|
338
313
|
|
|
339
314
|
or
|
|
340
315
|
|
|
@@ -342,7 +317,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
342
317
|
docker run --rm -it \
|
|
343
318
|
-v `pwd`:/workdir \
|
|
344
319
|
-w /workdir \
|
|
345
|
-
docker.io/pinto0309/onnx2tf:1.27.
|
|
320
|
+
docker.io/pinto0309/onnx2tf:1.27.9
|
|
346
321
|
|
|
347
322
|
or
|
|
348
323
|
|
|
@@ -1747,6 +1722,21 @@ optional arguments:
|
|
|
1747
1722
|
Numerical values other than dynamic dimensions are ignored.
|
|
1748
1723
|
Ignores --batch_size if specified at the same time as --batch_size.
|
|
1749
1724
|
|
|
1725
|
+
-sh SHAPE_HINTS [SHAPE_HINTS ...], \
|
|
1726
|
+
--shape_hints SHAPE_HINTS [SHAPE_HINTS ...]
|
|
1727
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
1728
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
1729
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
1730
|
+
the ONNX input shape with a static shape.
|
|
1731
|
+
The format is
|
|
1732
|
+
"i1:dim0,...,dimN" "i2:dim0,...,dimN" "i3:dim0,...,dimN"
|
|
1733
|
+
When there is only one input, for example,
|
|
1734
|
+
"data:1,3,224,224"
|
|
1735
|
+
When there are multiple inputs, for example,
|
|
1736
|
+
"data1:1,3,224,224" "data2:1,3,112" "data3:5"
|
|
1737
|
+
A value of 1 or more must be specified.
|
|
1738
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
1739
|
+
|
|
1750
1740
|
-nlt, --no_large_tensor
|
|
1751
1741
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
1752
1742
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -2052,6 +2042,7 @@ convert(
|
|
|
2052
2042
|
not_use_opname_auto_generate: Optional[bool] = False,
|
|
2053
2043
|
batch_size: Union[int, NoneType] = None,
|
|
2054
2044
|
overwrite_input_shape: Union[List[str], NoneType] = None,
|
|
2045
|
+
shape_hints: Union[List[str], NoneType] = None,
|
|
2055
2046
|
no_large_tensor: Optional[bool] = False,
|
|
2056
2047
|
output_nms_with_dynamic_tensor: Optional[bool] = False,
|
|
2057
2048
|
switch_nms_version: Optional[str] = 'v4',
|
|
@@ -2244,6 +2235,20 @@ convert(
|
|
|
2244
2235
|
Numerical values other than dynamic dimensions are ignored.
|
|
2245
2236
|
Ignores batch_size if specified at the same time as batch_size.
|
|
2246
2237
|
|
|
2238
|
+
shape_hints: Optional[List[str]]
|
|
2239
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
2240
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
2241
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
2242
|
+
the ONNX input shape with a static shape.
|
|
2243
|
+
The format is
|
|
2244
|
+
['i1:dim0,...,dimN', 'i2:dim0,...,dimN', 'i3:dim0,...,dimN']
|
|
2245
|
+
When there is only one input, for example,
|
|
2246
|
+
['data:1,3,224,224']
|
|
2247
|
+
When there are multiple inputs, for example,
|
|
2248
|
+
['data1:1,3,224,224', 'data2:1,3,112', 'data3:5']
|
|
2249
|
+
A value of 1 or more must be specified.
|
|
2250
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
2251
|
+
|
|
2247
2252
|
no_large_tensor: Optional[bool]
|
|
2248
2253
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
2249
2254
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -78,6 +78,7 @@ def convert(
|
|
|
78
78
|
not_use_opname_auto_generate: Optional[bool] = False,
|
|
79
79
|
batch_size: Optional[int] = None,
|
|
80
80
|
overwrite_input_shape: Optional[List[str]] = None,
|
|
81
|
+
shape_hints: Optional[List[str]] = None,
|
|
81
82
|
no_large_tensor: Optional[bool] = False,
|
|
82
83
|
output_nms_with_dynamic_tensor: Optional[bool] = False,
|
|
83
84
|
switch_nms_version: Optional[str] = 'v4',
|
|
@@ -255,6 +256,20 @@ def convert(
|
|
|
255
256
|
Numerical values other than dynamic dimensions are ignored.\n
|
|
256
257
|
Ignores batch_size if specified at the same time as batch_size.
|
|
257
258
|
|
|
259
|
+
shape_hints: Optional[List[str]]
|
|
260
|
+
Shape hints for input tensors containing dynamic dimensions.\n
|
|
261
|
+
Specify input shapes for test inference with -cotof or -coto.\n
|
|
262
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite\n
|
|
263
|
+
the ONNX input shape with a static shape.\n
|
|
264
|
+
The format is\n
|
|
265
|
+
["input_name_1:dim0,...,dimN","input_name_2:dim0,...,dimN","input_name_3:dim0,...,dimN"].\n
|
|
266
|
+
When there is only one input, for example,\n
|
|
267
|
+
['data:1,3,224,224']\n
|
|
268
|
+
When there are multiple inputs, for example,\n
|
|
269
|
+
['data1:1,3,224,224','data2:1,3,112,112','data3:5']\n
|
|
270
|
+
A value of 1 or more must be specified.\n
|
|
271
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
272
|
+
|
|
258
273
|
no_large_tensor: Optional[bool]
|
|
259
274
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.\n
|
|
260
275
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -1055,6 +1070,7 @@ def convert(
|
|
|
1055
1070
|
tf_layers_dict=tf_layers_dict,
|
|
1056
1071
|
use_cuda=use_cuda,
|
|
1057
1072
|
disable_strict_mode=disable_strict_mode,
|
|
1073
|
+
shape_hints=shape_hints if (check_onnx_tf_outputs_elementwise_close or check_onnx_tf_outputs_elementwise_close_full) else None,
|
|
1058
1074
|
)
|
|
1059
1075
|
"""
|
|
1060
1076
|
onnx_tensor_infos_for_validation:
|
|
@@ -1889,6 +1905,7 @@ def convert(
|
|
|
1889
1905
|
custom_input_op_name_np_data_path=custom_input_op_name_np_data_path,
|
|
1890
1906
|
tf_layers_dict=tf_layers_dict,
|
|
1891
1907
|
use_cuda=use_cuda,
|
|
1908
|
+
shape_hints=shape_hints,
|
|
1892
1909
|
)
|
|
1893
1910
|
except Exception as ex:
|
|
1894
1911
|
warn(
|
|
@@ -1898,12 +1915,17 @@ def convert(
|
|
|
1898
1915
|
warn(f'{ex}')
|
|
1899
1916
|
else:
|
|
1900
1917
|
# TF dummy inference
|
|
1901
|
-
tf_tensor_infos: Dict[Any] =
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1918
|
+
tf_tensor_infos: Dict[Any] = \
|
|
1919
|
+
dummy_tf_inference(
|
|
1920
|
+
model=model,
|
|
1921
|
+
inputs=inputs,
|
|
1922
|
+
test_data_nhwc=test_data_nhwc,
|
|
1923
|
+
custom_input_op_name_np_data_path=custom_input_op_name_np_data_path,
|
|
1924
|
+
shape_hints=shape_hints,
|
|
1925
|
+
keep_shape_absolutely_input_names=keep_shape_absolutely_input_names,
|
|
1926
|
+
keep_ncw_or_nchw_or_ncdhw_input_names=keep_ncw_or_nchw_or_ncdhw_input_names,
|
|
1927
|
+
keep_nwc_or_nhwc_or_ndhwc_input_names=keep_nwc_or_nhwc_or_ndhwc_input_names,
|
|
1928
|
+
)
|
|
1907
1929
|
# Validation
|
|
1908
1930
|
onnx_tensor_infos = {
|
|
1909
1931
|
output_name: dummy_onnx_output \
|
|
@@ -2207,6 +2229,25 @@ def main():
|
|
|
2207
2229
|
'Numerical values other than dynamic dimensions are ignored. \n' +
|
|
2208
2230
|
'Ignores --batch_size if specified at the same time as --batch_size.'
|
|
2209
2231
|
)
|
|
2232
|
+
parser.add_argument(
|
|
2233
|
+
'-sh',
|
|
2234
|
+
'--shape_hints',
|
|
2235
|
+
type=str,
|
|
2236
|
+
nargs='+',
|
|
2237
|
+
help=\
|
|
2238
|
+
'Shape hints for input tensors containing dynamic dimensions. \n' +
|
|
2239
|
+
'Specify input shapes for test inference with -cotof or -coto. \n' +
|
|
2240
|
+
'Unlike `--overwrite_input_shape`, this operation does not overwrite \n' +
|
|
2241
|
+
'the ONNX input shape with a static shape.\n' +
|
|
2242
|
+
'The format is\n' +
|
|
2243
|
+
'"input_name_1:dim0,...,dimN" "input_name_2:dim0,...,dimN" "input_name_3:dim0,...,dimN". \n' +
|
|
2244
|
+
'When there is only one input, for example, \n' +
|
|
2245
|
+
'"data:1,3,224,224" \n' +
|
|
2246
|
+
'When there are multiple inputs, for example, \n' +
|
|
2247
|
+
'"data1:1,3,224,224" "data2:1,3,112,112" "data3:5" \n' +
|
|
2248
|
+
'Only applied to dynamic dimensions in inputs. \n' +
|
|
2249
|
+
'Only used when -cotof or -coto are specified.'
|
|
2250
|
+
)
|
|
2210
2251
|
parser.add_argument(
|
|
2211
2252
|
'-nlt',
|
|
2212
2253
|
'--no_large_tensor',
|
|
@@ -2631,6 +2672,7 @@ def main():
|
|
|
2631
2672
|
not_use_opname_auto_generate=args.not_use_opname_auto_generate,
|
|
2632
2673
|
batch_size=args.batch_size,
|
|
2633
2674
|
overwrite_input_shape=args.overwrite_input_shape,
|
|
2675
|
+
shape_hints=args.shape_hints,
|
|
2634
2676
|
no_large_tensor=args.no_large_tensor,
|
|
2635
2677
|
output_nms_with_dynamic_tensor=args.output_nms_with_dynamic_tensor,
|
|
2636
2678
|
switch_nms_version=args.switch_nms_version,
|
|
@@ -3633,6 +3633,7 @@ def dummy_onnx_inference(
|
|
|
3633
3633
|
tf_layers_dict: Optional[Dict] = None,
|
|
3634
3634
|
use_cuda: bool = False,
|
|
3635
3635
|
disable_strict_mode: bool = False,
|
|
3636
|
+
shape_hints: Optional[List[str]] = None,
|
|
3636
3637
|
) -> List[np.ndarray]:
|
|
3637
3638
|
"""Perform inference on ONNX subgraphs with an all-1 dummy tensor.
|
|
3638
3639
|
|
|
@@ -3775,24 +3776,46 @@ def dummy_onnx_inference(
|
|
|
3775
3776
|
onnx_inputs = gs_graph.inputs
|
|
3776
3777
|
input_names: List[str] = [inp.name for inp in onnx_inputs]
|
|
3777
3778
|
input_sizes: List[int] = [inp.shape for inp in onnx_inputs]
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
for
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
and
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3779
|
+
|
|
3780
|
+
if shape_hints is None:
|
|
3781
|
+
new_input_sizes = []
|
|
3782
|
+
for input_size in input_sizes:
|
|
3783
|
+
new_input_size = []
|
|
3784
|
+
for idx, dim in enumerate(input_size):
|
|
3785
|
+
if idx == 0 and input_sizes[0][0] is not None \
|
|
3786
|
+
and not isinstance(input_sizes[0][0], str) \
|
|
3787
|
+
and len(input_sizes[0]) == len(input_size) \
|
|
3788
|
+
and (dim is None or isinstance(dim, str)):
|
|
3789
|
+
# Batch size assignment for input OPs
|
|
3790
|
+
new_input_size.append(input_sizes[0][0])
|
|
3791
|
+
elif dim is None or isinstance(dim, str):
|
|
3792
|
+
# Fixed and assigned 1
|
|
3793
|
+
new_input_size.append(1)
|
|
3794
|
+
else:
|
|
3795
|
+
# Assign input shape as is
|
|
3796
|
+
new_input_size.append(dim)
|
|
3797
|
+
new_input_sizes.append(new_input_size)
|
|
3798
|
+
input_sizes = new_input_sizes
|
|
3799
|
+
|
|
3800
|
+
else:
|
|
3801
|
+
shape_hints_dict = {}
|
|
3802
|
+
for hint in shape_hints:
|
|
3803
|
+
parts = hint.split(':')
|
|
3804
|
+
if len(parts) == 2:
|
|
3805
|
+
input_name = parts[0]
|
|
3806
|
+
shape_values = [int(val) for val in parts[1].split(',')]
|
|
3807
|
+
shape_hints_dict[input_name] = shape_values
|
|
3808
|
+
|
|
3809
|
+
for i, (input_name, original_shape) in enumerate(zip(input_names, input_sizes)):
|
|
3810
|
+
if input_name in shape_hints_dict:
|
|
3811
|
+
updated_shape = shape_hints_dict[input_name]
|
|
3812
|
+
for j, (orig_dim, hint_dim) in enumerate(zip(original_shape, updated_shape)):
|
|
3813
|
+
if orig_dim is not None and not isinstance(orig_dim, str):
|
|
3814
|
+
updated_shape[j] = orig_dim
|
|
3815
|
+
else:
|
|
3816
|
+
updated_shape[j] = hint_dim
|
|
3817
|
+
input_sizes[i] = updated_shape
|
|
3818
|
+
|
|
3796
3819
|
input_dtypes: List[Any] = [inp.dtype for inp in onnx_inputs]
|
|
3797
3820
|
input_datas = {}
|
|
3798
3821
|
|
|
@@ -3886,6 +3909,10 @@ def dummy_tf_inference(
|
|
|
3886
3909
|
test_data_nhwc: Optional[np.ndarray] = None,
|
|
3887
3910
|
verification_datas: Optional[List[np.ndarray]] = None,
|
|
3888
3911
|
custom_input_op_name_np_data_path: Optional[str] = None,
|
|
3912
|
+
shape_hints: Optional[List[str]] = None,
|
|
3913
|
+
keep_shape_absolutely_input_names: Optional[List[str]] = None,
|
|
3914
|
+
keep_ncw_or_nchw_or_ncdhw_input_names: Optional[List[str]] = None,
|
|
3915
|
+
keep_nwc_or_nhwc_or_ndhwc_input_names: Optional[List[str]] = None,
|
|
3889
3916
|
) -> Any:
|
|
3890
3917
|
"""Perform inference on TF subgraphs with an all-1 dummy tensor.
|
|
3891
3918
|
|
|
@@ -3914,23 +3941,74 @@ def dummy_tf_inference(
|
|
|
3914
3941
|
"""
|
|
3915
3942
|
input_names: List[str] = [inp.name for inp in inputs]
|
|
3916
3943
|
input_sizes: List[int] = [inp.shape for inp in inputs]
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
for
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
and
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3944
|
+
|
|
3945
|
+
if shape_hints is None:
|
|
3946
|
+
new_input_sizes = []
|
|
3947
|
+
for input_size in input_sizes:
|
|
3948
|
+
new_input_size = []
|
|
3949
|
+
for idx, dim in enumerate(input_size):
|
|
3950
|
+
if idx == 0 and input_sizes[0][0] is not None \
|
|
3951
|
+
and len(input_sizes[0]) == len(input_size) \
|
|
3952
|
+
and dim is None:
|
|
3953
|
+
# Batch size assignment for input OPs
|
|
3954
|
+
new_input_size.append(input_sizes[0][0])
|
|
3955
|
+
elif dim is None:
|
|
3956
|
+
# Fixed and assigned 1
|
|
3957
|
+
new_input_size.append(1)
|
|
3958
|
+
else:
|
|
3959
|
+
# Assign input shape as is
|
|
3960
|
+
new_input_size.append(dim)
|
|
3961
|
+
new_input_sizes.append(new_input_size)
|
|
3962
|
+
input_sizes = new_input_sizes
|
|
3963
|
+
|
|
3964
|
+
else:
|
|
3965
|
+
shape_hints_dict = {}
|
|
3966
|
+
for hint in shape_hints:
|
|
3967
|
+
parts = hint.split(':')
|
|
3968
|
+
if len(parts) == 2:
|
|
3969
|
+
input_name = parts[0]
|
|
3970
|
+
shape_values = [int(val) for val in parts[1].split(',')]
|
|
3971
|
+
shape_hints_dict[input_name] = shape_values
|
|
3972
|
+
|
|
3973
|
+
for i, (input_name, original_shape) in enumerate(zip(input_names, input_sizes)):
|
|
3974
|
+
if input_name in shape_hints_dict:
|
|
3975
|
+
hint_shape = shape_hints_dict[input_name]
|
|
3976
|
+
updated_shape = []
|
|
3977
|
+
|
|
3978
|
+
# Check if we need to keep the original shape
|
|
3979
|
+
keep_absolutely = (
|
|
3980
|
+
keep_shape_absolutely_input_names is not None and
|
|
3981
|
+
input_name in keep_shape_absolutely_input_names
|
|
3982
|
+
)
|
|
3983
|
+
keep_nchw = (
|
|
3984
|
+
keep_ncw_or_nchw_or_ncdhw_input_names is not None and
|
|
3985
|
+
input_name in keep_ncw_or_nchw_or_ncdhw_input_names
|
|
3986
|
+
)
|
|
3987
|
+
keep_nhwc = (
|
|
3988
|
+
keep_nwc_or_nhwc_or_ndhwc_input_names is not None and
|
|
3989
|
+
input_name in keep_nwc_or_nhwc_or_ndhwc_input_names
|
|
3990
|
+
)
|
|
3991
|
+
|
|
3992
|
+
if keep_absolutely or keep_nchw:
|
|
3993
|
+
updated_shape = hint_shape
|
|
3994
|
+
# Otherwise, convert from NCHW to NHWC based on dimensionality
|
|
3995
|
+
elif len(hint_shape) == 3: # NCW -> NWC [0,2,1]
|
|
3996
|
+
updated_shape = [hint_shape[0], hint_shape[2], hint_shape[1]]
|
|
3997
|
+
elif len(hint_shape) == 4: # NCHW -> NHWC [0,3,1,2]
|
|
3998
|
+
updated_shape = [hint_shape[0], hint_shape[2], hint_shape[3], hint_shape[1]]
|
|
3999
|
+
elif len(hint_shape) == 5: # NCDHW -> NDHWC [0,4,1,2,3]
|
|
4000
|
+
updated_shape = [hint_shape[0], hint_shape[2], hint_shape[3], hint_shape[4], hint_shape[1]]
|
|
4001
|
+
else:
|
|
4002
|
+
updated_shape = hint_shape
|
|
4003
|
+
|
|
4004
|
+
for j, (orig_dim, hint_dim) in enumerate(zip(original_shape, updated_shape)):
|
|
4005
|
+
if orig_dim is not None and not isinstance(orig_dim, str):
|
|
4006
|
+
updated_shape[j] = orig_dim
|
|
4007
|
+
else:
|
|
4008
|
+
updated_shape[j] = hint_dim
|
|
4009
|
+
|
|
4010
|
+
input_sizes[i] = updated_shape
|
|
4011
|
+
|
|
3934
4012
|
input_dtypes: List[Any] = [inp.dtype for inp in inputs]
|
|
3935
4013
|
input_datas = {}
|
|
3936
4014
|
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: onnx2tf
|
|
3
|
+
Version: 1.27.9
|
|
4
|
+
Summary: Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
|
|
5
|
+
Home-page: https://github.com/PINTO0309/onnx2tf
|
|
6
|
+
Author: Katsuya Hyodo
|
|
7
|
+
Author-email: rmsdh122@yahoo.co.jp
|
|
8
|
+
License: MIT License
|
|
9
|
+
Platform: linux
|
|
10
|
+
Platform: unix
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
License-File: LICENSE_onnx-tensorflow
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: author-email
|
|
17
|
+
Dynamic: description
|
|
18
|
+
Dynamic: description-content-type
|
|
19
|
+
Dynamic: home-page
|
|
20
|
+
Dynamic: license
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
Dynamic: platform
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
1
26
|
# onnx2tf
|
|
2
27
|
Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in [onnx-tensorflow](https://github.com/onnx/onnx-tensorflow) ([onnx-tf](https://pypi.org/project/onnx-tf/)). I don't need a Star, but give me a pull request. Since I am adding challenging model optimizations and fixing bugs almost daily, I frequently embed potential bugs that would otherwise break through CI's regression testing. Therefore, if you encounter new problems, I recommend that you try a package that is a few versions older, or try the latest package that will be released in a few days.
|
|
3
28
|
|
|
@@ -309,7 +334,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
309
334
|
docker run --rm -it \
|
|
310
335
|
-v `pwd`:/workdir \
|
|
311
336
|
-w /workdir \
|
|
312
|
-
ghcr.io/pinto0309/onnx2tf:1.27.
|
|
337
|
+
ghcr.io/pinto0309/onnx2tf:1.27.9
|
|
313
338
|
|
|
314
339
|
or
|
|
315
340
|
|
|
@@ -317,7 +342,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
317
342
|
docker run --rm -it \
|
|
318
343
|
-v `pwd`:/workdir \
|
|
319
344
|
-w /workdir \
|
|
320
|
-
docker.io/pinto0309/onnx2tf:1.27.
|
|
345
|
+
docker.io/pinto0309/onnx2tf:1.27.9
|
|
321
346
|
|
|
322
347
|
or
|
|
323
348
|
|
|
@@ -1722,6 +1747,21 @@ optional arguments:
|
|
|
1722
1747
|
Numerical values other than dynamic dimensions are ignored.
|
|
1723
1748
|
Ignores --batch_size if specified at the same time as --batch_size.
|
|
1724
1749
|
|
|
1750
|
+
-sh SHAPE_HINTS [SHAPE_HINTS ...], \
|
|
1751
|
+
--shape_hints SHAPE_HINTS [SHAPE_HINTS ...]
|
|
1752
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
1753
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
1754
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
1755
|
+
the ONNX input shape with a static shape.
|
|
1756
|
+
The format is
|
|
1757
|
+
"i1:dim0,...,dimN" "i2:dim0,...,dimN" "i3:dim0,...,dimN"
|
|
1758
|
+
When there is only one input, for example,
|
|
1759
|
+
"data:1,3,224,224"
|
|
1760
|
+
When there are multiple inputs, for example,
|
|
1761
|
+
"data1:1,3,224,224" "data2:1,3,112" "data3:5"
|
|
1762
|
+
A value of 1 or more must be specified.
|
|
1763
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
1764
|
+
|
|
1725
1765
|
-nlt, --no_large_tensor
|
|
1726
1766
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
1727
1767
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
@@ -2027,6 +2067,7 @@ convert(
|
|
|
2027
2067
|
not_use_opname_auto_generate: Optional[bool] = False,
|
|
2028
2068
|
batch_size: Union[int, NoneType] = None,
|
|
2029
2069
|
overwrite_input_shape: Union[List[str], NoneType] = None,
|
|
2070
|
+
shape_hints: Union[List[str], NoneType] = None,
|
|
2030
2071
|
no_large_tensor: Optional[bool] = False,
|
|
2031
2072
|
output_nms_with_dynamic_tensor: Optional[bool] = False,
|
|
2032
2073
|
switch_nms_version: Optional[str] = 'v4',
|
|
@@ -2219,6 +2260,20 @@ convert(
|
|
|
2219
2260
|
Numerical values other than dynamic dimensions are ignored.
|
|
2220
2261
|
Ignores batch_size if specified at the same time as batch_size.
|
|
2221
2262
|
|
|
2263
|
+
shape_hints: Optional[List[str]]
|
|
2264
|
+
Shape hints for input tensors containing dynamic dimensions.
|
|
2265
|
+
Specify input shapes for test inference with -cotof or -coto.
|
|
2266
|
+
Unlike `--overwrite_input_shape`, this operation does not overwrite
|
|
2267
|
+
the ONNX input shape with a static shape.
|
|
2268
|
+
The format is
|
|
2269
|
+
['i1:dim0,...,dimN', 'i2:dim0,...,dimN', 'i3:dim0,...,dimN']
|
|
2270
|
+
When there is only one input, for example,
|
|
2271
|
+
['data:1,3,224,224']
|
|
2272
|
+
When there are multiple inputs, for example,
|
|
2273
|
+
['data1:1,3,224,224', 'data2:1,3,112', 'data3:5']
|
|
2274
|
+
A value of 1 or more must be specified.
|
|
2275
|
+
Numerical values other than dynamic dimensions are ignored.
|
|
2276
|
+
|
|
2222
2277
|
no_large_tensor: Optional[bool]
|
|
2223
2278
|
Suppresses constant bloat caused by Tile OP when optimizing models in onnxsim.
|
|
2224
2279
|
See: https://github.com/daquexian/onnx-simplifier/issues/178
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|