UNPKG

@tensorflow/tfjs-core

Version:

Hardware-accelerated JavaScript library for machine intelligence

742 lines (741 loc) 29.2 kB
/** * @license * Copyright 2020 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============================================================================= */ import { NamedTensorInfoMap, TensorInfo } from './kernel_registry'; import { ExplicitPadding } from './ops/conv_util'; import { Activation } from './ops/fused_types'; import { DataType, PixelData } from './types'; export declare const Abs = "Abs"; export declare type AbsInputs = UnaryInputs; export declare const Acos = "Acos"; export declare type AcosInputs = UnaryInputs; export declare const Acosh = "Acosh"; export declare type AcoshInputs = UnaryInputs; export declare const Add = "Add"; export declare type AddInputs = BinaryInputs; export declare const AddN = "AddN"; export declare type AddNInputs = TensorInfo[]; export declare const All = "All"; export declare type AllInputs = Pick<NamedTensorInfoMap, 'x'>; export interface AllAttrs { axis: number | number[]; keepDims: boolean; } export declare const Any = "Any"; export declare type AnyInputs = Pick<NamedTensorInfoMap, 'x'>; export interface AnyAttrs { axis: number | number[]; keepDims: boolean; } export declare const ArgMax = "ArgMax"; export declare type ArgMaxInputs = Pick<NamedTensorInfoMap, 'x'>; export interface ArgMaxAttrs { axis: number; } export declare const ArgMin = "ArgMin"; export declare type ArgMinInputs = Pick<NamedTensorInfoMap, 'x'>; export interface ArgMinAttrs { axis: number; } export declare const Asin = "Asin"; export declare type AsinInputs = UnaryInputs; export declare const Asinh = "Asinh"; export declare type AsinhInputs = UnaryInputs; export declare const Atan = "Atan"; export declare type AtanInputs = UnaryInputs; export declare const Atanh = "Atanh"; export declare type AtanhInputs = UnaryInputs; export declare const Atan2 = "Atan2"; export declare type Atan2Inputs = BinaryInputs; export declare const AvgPool = "AvgPool"; export declare type AvgPoolInputs = Pick<NamedTensorInfoMap, 'x'>; export interface AvgPoolAttrs { filterSize: [number, number] | number; strides: [number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const AvgPoolGrad = "AvgPoolGrad"; export declare type AvgPoolGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input'>; export interface AvgPoolGradAttrs { filterSize: [number, number] | number; strides: [number, number] | number; pad: 'valid' | 'same' | number; } export declare const AvgPool3D = "AvgPool3D"; export declare type AvgPool3DInputs = Pick<NamedTensorInfoMap, 'x'>; export interface AvgPool3DAttrs { filterSize: [number, number, number] | number; strides: [number, number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; dataFormat: 'NDHWC' | 'NCDHW'; } export declare const AvgPool3DGrad = "AvgPool3DGrad"; export declare type AvgPool3DGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input'>; export interface AvgPool3DGradAttrs { filterSize: [number, number, number] | number; strides: [number, number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const BatchMatMul = "BatchMatMul"; export declare type BatchMatMulInputs = Pick<NamedTensorInfoMap, 'a' | 'b'>; export interface BatchMatMulAttrs { transposeA: boolean; transposeB: boolean; } export declare const BatchToSpaceND = "BatchToSpaceND"; export declare type BatchToSpaceNDInputs = Pick<NamedTensorInfoMap, 'x'>; export interface BatchToSpaceNDAttrs { blockShape: number[]; crops: number[][]; } export declare type BinaryInputs = Pick<NamedTensorInfoMap, 'a' | 'b'>; export declare const Bincount = "Bincount"; export declare type BincountInputs = Pick<NamedTensorInfoMap, 'x' | 'weights'>; export interface BincountAttrs { size: number; } export declare const BroadcastTo = "BroadcastTo"; export declare type BroadcastToInputs = Pick<NamedTensorInfoMap, 'x'>; export interface BroadCastToAttrs { shape: number[]; inputShape: number[]; } export declare const Cast = "Cast"; export declare type CastInputs = UnaryInputs; export interface CastAttrs { dtype: DataType; } export declare const Ceil = "Ceil"; export declare type CeilInputs = UnaryInputs; export declare const ClipByValue = "ClipByValue"; export declare type ClipByValueInputs = UnaryInputs; export interface ClipByValueAttrs { clipValueMin: number; clipValueMax: number; } export declare const Complex = "Complex"; export declare type ComplexInputs = Pick<NamedTensorInfoMap, 'real' | 'imag'>; export declare const ComplexAbs = "ComplexAbs"; export declare type ComplexAbsInputs = UnaryInputs; export declare const Concat = "Concat"; export declare type ConcatInputs = TensorInfo[]; export interface ConcatAttrs { axis: number; } export declare const Conv2D = "Conv2D"; export declare type Conv2DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>; export interface Conv2DAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number | ExplicitPadding; dataFormat: 'NHWC' | 'NCHW'; dilations: [number, number] | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const Conv2DBackpropFilter = "Conv2DBackpropFilter"; export declare type Conv2DBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>; export interface Conv2DBackpropFilterAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number | ExplicitPadding; dataFormat: 'NHWC' | 'NCHW'; dimRoundingMode?: 'floor' | 'round' | 'ceil'; filterShape: [number, number, number, number]; } export declare const Conv2DBackpropInput = "Conv2DBackpropInput"; export declare type Conv2DBackpropInputInputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>; export interface Conv2DBackpropInputAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number | ExplicitPadding; dataFormat: 'NHWC' | 'NCHW'; dimRoundingMode?: 'floor' | 'round' | 'ceil'; inputShape: [number, number, number, number]; } export declare const Conv3D = "Conv3D"; export declare type Conv3DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>; export interface Conv3DAttrs { strides: [number, number, number] | number; pad: 'valid' | 'same'; dataFormat: 'NDHWC' | 'NCDHW'; dilations: [number, number, number] | number; } export declare const Conv3DBackpropFilterV2 = "Conv3DBackpropFilterV2"; export declare type Conv3DBackpropFilterV2Inputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>; export interface Conv3DBackpropFilterV2Attrs { strides: [number, number, number] | number; pad: 'valid' | 'same'; filterShape: [number, number, number, number, number]; } export declare const Conv3DBackpropInputV2 = "Conv3DBackpropInputV2"; export declare type Conv3DBackpropInputV2Inputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>; export interface Conv3DBackpropInputV2Attrs { strides: [number, number, number] | number; pad: 'valid' | 'same'; inputShape: [number, number, number, number, number]; } export declare const Cos = "Cos"; export declare type CosInputs = UnaryInputs; export declare const Cosh = "Cosh"; export declare type CoshInputs = UnaryInputs; export declare const Cumsum = "Cumsum"; export declare type CumsumInputs = Pick<NamedTensorInfoMap, 'x'>; export interface CumsumAttrs { axis: number; exclusive: boolean; reverse: boolean; } export declare const CropAndResize = "CropAndResize"; export declare type CropAndResizeInputs = Pick<NamedTensorInfoMap, 'image' | 'boxes' | 'boxInd'>; export interface CropAndResizeAttrs { cropSize: [number, number]; method: 'bilinear' | 'nearest'; extrapolationValue: number; } export declare const DenseBincount = "DenseBincount"; export declare type DenseBincountInputs = Pick<NamedTensorInfoMap, 'x' | 'weights'>; export interface DenseBincountAttrs { size: number; binaryOutput?: boolean; } export declare const DepthToSpace = "DepthToSpace"; export declare type DepthToSpaceInputs = Pick<NamedTensorInfoMap, 'x'>; export interface DepthToSpaceAttrs { blockSize: number; dataFormat: 'NHWC' | 'NCHW'; } export declare const DepthwiseConv2dNative = "DepthwiseConv2dNative"; export declare type DepthwiseConv2dNativeInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>; export interface DepthwiseConv2dNativeAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number; dataFormat: 'NHWC' | 'NCHW'; dilations: [number, number] | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const DepthwiseConv2dNativeBackpropFilter = "DepthwiseConv2dNativeBackpropFilter"; export declare type DepthwiseConv2dNativeBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>; export interface DepthwiseConv2dNativeBackpropFilterAttrs { strides: [number, number] | number; dilations: [number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; filterShape: [number, number, number, number]; } export declare const DepthwiseConv2dNativeBackpropInput = "DepthwiseConv2dNativeBackpropInput"; export declare type DepthwiseConv2dNativeBackpropInputInputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>; export interface DepthwiseConv2dNativeBackpropInputAttrs { strides: [number, number] | number; dilations: [number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; inputShape: [number, number, number, number]; } export declare const Diag = "Diag"; export declare type DiagInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Dilation2D = "Dilation2D"; export declare type Dilation2DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>; export interface Dilation2DAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number; dilations: [number, number] | number; } export declare const Dilation2DBackpropInput = "Dilation2DBackpropInput"; export declare type Dilation2DBackpropInputInputs = Pick<NamedTensorInfoMap, 'x' | 'filter' | 'dy'>; export declare const Dilation2DBackpropFilter = "Dilation2DBackpropFilter"; export declare type Dilation2DBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'filter' | 'dy'>; export declare const RealDiv = "RealDiv"; export declare type RealDivInputs = BinaryInputs; export declare const Elu = "Elu"; export declare type EluInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const EluGrad = "EluGrad"; export declare type EluGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'y'>; export declare const Erf = "Erf"; export declare type ErfInputs = UnaryInputs; export declare const Equal = "Equal"; export declare type EqualInputs = BinaryInputs; export declare const Exp = "Exp"; export declare type ExpInputs = UnaryInputs; export declare const ExpandDims = "ExpandDims"; export declare type ExpandDimsInputs = Pick<NamedTensorInfoMap, 'input'>; export interface ExpandDimsAttrs { dim: number; } export declare const Expm1 = "Expm1"; export declare type Expm1Inputs = UnaryInputs; export declare const FFT = "FFT"; export declare type FFTInputs = Pick<NamedTensorInfoMap, 'input'>; export declare const Fill = "Fill"; export interface FillAttrs { shape: number[]; value: number | string; dtype: DataType; } export declare const FlipLeftRight = "FlipLeftRight"; export declare type FlipLeftRightInputs = Pick<NamedTensorInfoMap, 'image'>; export declare const Floor = "Floor"; export declare type FloorInputs = UnaryInputs; export declare const FloorDiv = "FloorDiv"; export declare type FloorDivInputs = BinaryInputs; export declare const FusedBatchNorm = "FusedBatchNorm"; export declare type FusedBatchNormInputs = Pick<NamedTensorInfoMap, 'x' | 'scale' | 'offset' | 'mean' | 'variance'>; export interface FusedBatchNormAttrs { varianceEpsilon: number; } export declare const GatherV2 = "GatherV2"; export declare type GatherV2Inputs = Pick<NamedTensorInfoMap, 'x' | 'indices'>; export interface GatherV2Attrs { axis: number; batchDims: number; } export declare const GatherNd = "GatherNd"; export declare type GatherNdInputs = Pick<NamedTensorInfoMap, 'params' | 'indices'>; export declare const Greater = "Greater"; export declare type GreaterInputs = BinaryInputs; export declare const GreaterEqual = "GreaterEqual"; export declare type GreaterEqualInputs = BinaryInputs; export declare const Identity = "Identity"; export declare type IdentityInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const IFFT = "IFFT"; export declare type IFFTInputs = Pick<NamedTensorInfoMap, 'input'>; export declare const Imag = "Imag"; export declare type ImagInputs = Pick<NamedTensorInfoMap, 'input'>; export declare const IsFinite = "IsFinite"; export declare type IsFiniteInputs = UnaryInputs; export declare const IsInf = "IsInf"; export declare type IsInfInputs = UnaryInputs; export declare const IsNan = "IsNan"; export declare type IsNanInputs = UnaryInputs; export declare const LeakyRelu = "LeakyRelu"; export declare type LeakyReluInputs = Pick<NamedTensorInfoMap, 'x'>; export interface LeakyReluAttrs { alpha: number; } export declare const Less = "Less"; export declare type LessInputs = BinaryInputs; export declare const LessEqual = "LessEqual"; export declare type LessEqualInputs = BinaryInputs; export declare const LinSpace = "LinSpace"; export interface LinSpaceAttrs { start: number; stop: number; num: number; } export declare const Log = "Log"; export declare type LogInputs = UnaryInputs; export declare const Log1p = "Log1p"; export declare type Log1pInputs = UnaryInputs; export declare const LogicalAnd = "LogicalAnd"; export declare type LogicalAndInputs = BinaryInputs; export declare const LogicalNot = "LogicalNot"; export declare type LogicalNotInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const LogicalOr = "LogicalOr"; export declare type LogicalOrInputs = BinaryInputs; export declare const LogSoftmax = "LogSoftmax"; export declare type LogSoftmaxInputs = Pick<NamedTensorInfoMap, 'logits'>; export interface LogSoftmaxAttrs { axis: number; } export declare const LRN = "LRN"; export declare type LRNInputs = Pick<NamedTensorInfoMap, 'x'>; export interface LRNAttrs { depthRadius: number; bias: number; alpha: number; beta: number; } export declare const LRNGrad = "LRNGrad"; export declare type LRNGradInputs = Pick<NamedTensorInfoMap, 'x' | 'y' | 'dy'>; export interface LRNGradAttrs { depthRadius: number; bias: number; alpha: number; beta: number; } export declare const Max = "Max"; export declare type MaxInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MaxAttrs { reductionIndices: number | number[]; keepDims: boolean; } export declare const Maximum = "Maximum"; export declare type MaximumInputs = BinaryInputs; export declare const MaxPool = "MaxPool"; export declare type MaxPoolInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MaxPoolAttrs { filterSize: [number, number] | number; strides: [number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const MaxPoolGrad = "MaxPoolGrad"; export declare type MaxPoolGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input' | 'output'>; export interface MaxPoolGradAttrs { filterSize: [number, number] | number; strides: [number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const MaxPool3D = "MaxPool3D"; export declare type MaxPool3DInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MaxPool3DAttrs { filterSize: [number, number, number] | number; strides: [number, number, number] | number; pad: 'valid' | 'same' | number; dataFormat: 'NDHWC' | 'NCDHW'; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const MaxPool3DGrad = "MaxPool3DGrad"; export declare type MaxPool3DGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input' | 'output'>; export interface MaxPool3DGradAttrs { filterSize: [number, number, number] | number; strides: [number, number, number] | number; pad: 'valid' | 'same' | number; dimRoundingMode?: 'floor' | 'round' | 'ceil'; } export declare const MaxPoolWithArgmax = "MaxPoolWithArgmax"; export declare type MaxPoolWithArgmaxInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MaxPoolWithArgmaxAttrs { filterSize: [number, number] | number; strides: [number, number] | number; pad: 'valid' | 'same' | number; includeBatchInIndex: boolean; } export declare const Mean = "Mean"; export declare type MeanInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MeanAttrs { axis: number | number[]; keepDims: boolean; } export declare const Min = "Min"; export declare type MinInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MinAttrs { axis: number | number[]; keepDims: boolean; } export declare const Minimum = "Minimum"; export declare type MinimumInputs = BinaryInputs; export declare const MirrorPad = "MirrorPad"; export declare type MirrorPadInputs = Pick<NamedTensorInfoMap, 'x'>; export interface MirrorPadAttrs { paddings: Array<[number, number]>; mode: 'reflect' | 'symmetric'; } export declare const Mod = "Mod"; export declare type ModInputs = BinaryInputs; export declare const Multinomial = "Multinomial"; export declare type MultinomialInputs = Pick<NamedTensorInfoMap, 'logits'>; export interface MultinomialAttrs { numSamples: number; seed: number; normalized: boolean; } export declare const Multiply = "Multiply"; export declare type MultiplyInputs = BinaryInputs; export declare const Neg = "Neg"; export declare type NegInputs = UnaryInputs; export declare const NotEqual = "NotEqual"; export declare type NotEqualInputs = BinaryInputs; export declare const NonMaxSuppressionV3 = "NonMaxSuppressionV3"; export declare type NonMaxSuppressionV3Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>; export interface NonMaxSuppressionV3Attrs { maxOutputSize: number; iouThreshold: number; scoreThreshold: number; } export declare const NonMaxSuppressionV4 = "NonMaxSuppressionV4"; export declare type NonMaxSuppressionV4Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>; export interface NonMaxSuppressionV4Attrs { maxOutputSize: number; iouThreshold: number; scoreThreshold: number; padToMaxOutputSize: boolean; } export declare const NonMaxSuppressionV5 = "NonMaxSuppressionV5"; export declare type NonMaxSuppressionV5Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>; export interface NonMaxSuppressionV5Attrs { maxOutputSize: number; iouThreshold: number; scoreThreshold: number; softNmsSigma: number; } export declare const OnesLike = "OnesLike"; export declare type OnesLikeInputs = UnaryInputs; export declare const OneHot = "OneHot"; export declare type OneHotInputs = Pick<NamedTensorInfoMap, 'indices'>; export interface OneHotAttrs { depth: number; onValue: number; offValue: number; } export declare const Pack = "Pack"; export declare type PackInputs = TensorInfo[]; export interface PackAttrs { axis: number; } export declare const PadV2 = "PadV2"; export declare type PadV2Inputs = Pick<NamedTensorInfoMap, 'x'>; export interface PadV2Attrs { paddings: Array<[number, number]>; constantValue: number; } export declare const Pool = "Pool"; export declare type PoolInputs = Pick<NamedTensorInfoMap, 'input'>; export declare const Pow = "Pow"; export declare type PowInputs = BinaryInputs; export declare const Prelu = "Prelu"; export declare type PreluInputs = Pick<NamedTensorInfoMap, 'x' | 'alpha'>; export declare const Prod = "Prod"; export declare type ProdInputs = Pick<NamedTensorInfoMap, 'x'>; export interface ProdAttrs { axis: number | number[]; keepDims: boolean; } export declare const Range = "Range"; export interface RangeAttrs { start: number; stop: number; step: number; dtype: 'float32' | 'int32'; } export declare const Real = "Real"; export declare type RealInputs = Pick<NamedTensorInfoMap, 'input'>; export declare const Reciprocal = "Reciprocal"; export declare type ReciprocalInputs = UnaryInputs; export declare const Relu = "Relu"; export declare type ReluInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Reshape = "Reshape"; export declare type ReshapeInputs = Pick<NamedTensorInfoMap, 'x'>; export interface ReshapeAttrs { shape: number[]; } export declare const ResizeNearestNeighbor = "ResizeNearestNeighbor"; export declare type ResizeNearestNeighborInputs = Pick<NamedTensorInfoMap, 'images'>; export interface ResizeNearestNeighborAttrs { alignCorners: boolean; halfPixelCenters: boolean; size: [number, number]; } export declare const ResizeNearestNeighborGrad = "ResizeNearestNeighborGrad"; export declare type ResizeNearestNeighborGradInputs = Pick<NamedTensorInfoMap, 'images' | 'dy'>; export declare type ResizeNearestNeighborGradAttrs = ResizeNearestNeighborAttrs; export declare const ResizeBilinear = "ResizeBilinear"; export declare type ResizeBilinearInputs = Pick<NamedTensorInfoMap, 'images'>; export interface ResizeBilinearAttrs { alignCorners: boolean; halfPixelCenters: boolean; size: [number, number]; } export declare const ResizeBilinearGrad = "ResizeBilinearGrad"; export declare type ResizeBilinearGradInputs = Pick<NamedTensorInfoMap, 'images' | 'dy'>; export declare type ResizeBilinearGradAttrs = ResizeBilinearAttrs; export declare const Relu6 = "Relu6"; export declare type Relu6Inputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Reverse = "Reverse"; export declare type ReverseInputs = Pick<NamedTensorInfoMap, 'x'>; export interface ReverseAttrs { dims: number | number[]; } export declare const Round = "Round"; export declare type RoundInputs = UnaryInputs; export declare const Rsqrt = "Rsqrt"; export declare type RsqrtInputs = UnaryInputs; export declare const ScatterNd = "ScatterNd"; export declare type ScatterNdInputs = Pick<NamedTensorInfoMap, 'indices' | 'updates'>; export interface ScatterNdAttrs { shape: number[]; } export declare const Select = "Select"; export declare type SelectInputs = Pick<NamedTensorInfoMap, 'condition' | 't' | 'e'>; export declare const Selu = "Selu"; export declare type SeluInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Slice = "Slice"; export declare type SliceInputs = Pick<NamedTensorInfoMap, 'x'>; export interface SliceAttrs { begin: number | number[]; size: number | number[]; } export declare const Sin = "Sin"; export declare type SinInputs = UnaryInputs; export declare const Sinh = "Sinh"; export declare type SinhInputs = UnaryInputs; export declare const Sign = "Sign"; export declare type SignInputs = UnaryInputs; export declare const Sigmoid = "Sigmoid"; export declare type SigmoidInputs = UnaryInputs; export declare const Softplus = "Softplus"; export declare type SoftplusInputs = UnaryInputs; export declare const Sqrt = "Sqrt"; export declare type SqrtInputs = UnaryInputs; export declare const Sum = "Sum"; export declare type SumInputs = Pick<NamedTensorInfoMap, 'x'>; export interface SumAttrs { axis: number | number[]; keepDims: boolean; } export declare const SpaceToBatchND = "SpaceToBatchND"; export declare type SpaceToBatchNDInputs = Pick<NamedTensorInfoMap, 'x'>; export interface SpaceToBatchNDAttrs { blockShape: number[]; paddings: number[][]; } export declare const SplitV = "SplitV"; export declare type SplitVInputs = Pick<NamedTensorInfoMap, 'x'>; export interface SplitVAttrs { numOrSizeSplits: number[] | number; axis: number; } export declare const Softmax = "Softmax"; export declare type SoftmaxInputs = Pick<NamedTensorInfoMap, 'logits'>; export interface SoftmaxAttrs { dim: number; } export declare const SquaredDifference = "SquaredDifference"; export declare type SquaredDifferenceInputs = BinaryInputs; export declare const Square = "Square"; export declare type SquareInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Sub = "Sub"; export declare type SubInputs = BinaryInputs; export declare const SparseToDense = "SparseToDense"; export declare type SparseToDenseInputs = Pick<NamedTensorInfoMap, 'sparseIndices' | 'sparseValues' | 'defaultValue'>; export interface SparseToDenseAttrs { outputShape: number[]; } export declare const StridedSlice = "StridedSlice"; export declare type StridedSliceInputs = Pick<NamedTensorInfoMap, 'x'>; export interface StridedSliceAttrs { begin: number[]; end: number[]; strides: number[]; beginMask: number; endMask: number; ellipsisMask: number; newAxisMask: number; shrinkAxisMask: number; } export declare const Tan = "Tan"; export declare type TanInputs = UnaryInputs; export declare const Tanh = "Tanh"; export declare type TanhInputs = UnaryInputs; export declare const Tile = "Tile"; export declare type TileInputs = Pick<NamedTensorInfoMap, 'x'>; export interface TileAttrs { reps: number[]; } export declare const TopK = "TopK"; export declare type TopKInputs = Pick<NamedTensorInfoMap, 'x'>; export interface TopKAttrs { k: number; sorted: boolean; } export declare const Transform = "Transform"; export declare type TransformInputs = Pick<NamedTensorInfoMap, 'image' | 'transforms'>; export interface TransformAttrs { interpolation: 'nearest' | 'bilinear'; fillMode: 'constant' | 'reflect' | 'wrap' | 'nearest'; fillValue: number; outputShape?: [number, number]; } export declare const Transpose = "Transpose"; export declare type TransposeInputs = Pick<NamedTensorInfoMap, 'x'>; export interface TransposeAttrs { perm: number[]; } export declare const Unique = "Unique"; export declare type UniqueInputs = Pick<NamedTensorInfoMap, 'x'>; export interface UniqueAttrs { axis: number; } export declare type UnaryInputs = Pick<NamedTensorInfoMap, 'x'>; export declare const Unpack = "Unpack"; export declare type UnpackInputs = Pick<NamedTensorInfoMap, 'value'>; export interface UnpackAttrs { axis: number; } export declare const UnsortedSegmentSum = "UnsortedSegmentSum"; export declare type UnsortedSegmentSumInputs = Pick<NamedTensorInfoMap, 'x' | 'segmentIds'>; export interface UnsortedSegmentSumAttrs { numSegments: number; } export declare const ZerosLike = "ZerosLike"; export declare type ZerosLikeInputs = UnaryInputs; /** * TensorFlow.js-only kernels */ export declare const Step = "Step"; export declare type StepInputs = UnaryInputs; export interface StepAttrs { alpha: number; } export declare const FromPixels = "FromPixels"; export interface FromPixelsInputs { pixels: PixelData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap; } export interface FromPixelsAttrs { numChannels: number; } export declare const RotateWithOffset = "RotateWithOffset"; export declare type RotateWithOffsetInputs = Pick<NamedTensorInfoMap, 'image'>; export interface RotateWithOffsetAttrs { radians: number; fillValue: number | [number, number, number]; center: number | [number, number]; } export declare const _FusedMatMul = "_FusedMatMul"; export interface _FusedMatMulInputs extends NamedTensorInfoMap { a: TensorInfo; b: TensorInfo; bias?: TensorInfo; preluActivationWeights?: TensorInfo; } export interface _FusedMatMulAttrs { transposeA: boolean; transposeB: boolean; activation: Activation; leakyreluAlpha?: number; } export declare const FusedConv2D = "FusedConv2D"; export interface FusedConv2DInputs extends NamedTensorInfoMap { x: TensorInfo; filter: TensorInfo; bias?: TensorInfo; preluActivationWeights?: TensorInfo; } export interface FusedConv2DAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number | ExplicitPadding; dataFormat: 'NHWC' | 'NCHW'; dilations: [number, number] | number; dimRoundingMode: 'floor' | 'round' | 'ceil'; activation: Activation; leakyreluAlpha?: number; } export declare const FusedDepthwiseConv2D = "FusedDepthwiseConv2D"; export interface FusedDepthwiseConv2DInputs extends NamedTensorInfoMap { x: TensorInfo; filter: TensorInfo; bias?: TensorInfo; preluActivationWeights?: TensorInfo; } export interface FusedDepthwiseConv2DAttrs { strides: [number, number] | number; pad: 'valid' | 'same' | number; dataFormat: 'NHWC' | 'NCHW'; dilations: [number, number] | number; dimRoundingMode: 'floor' | 'round' | 'ceil'; activation: Activation; leakyreluAlpha?: number; }