UNPKG

30.9 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2020 Google LLC. All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * =============================================================================
16 */
17import { NamedTensorInfoMap, TensorInfo } from './kernel_registry';
18import { ExplicitPadding } from './ops/conv_util';
19import { Activation } from './ops/fused_types';
20import { DataType, PixelData } from './types';
21export declare const Abs = "Abs";
22export declare type AbsInputs = UnaryInputs;
23export declare const Acos = "Acos";
24export declare type AcosInputs = UnaryInputs;
25export declare const Acosh = "Acosh";
26export declare type AcoshInputs = UnaryInputs;
27export declare const Add = "Add";
28export declare type AddInputs = BinaryInputs;
29export declare const AddN = "AddN";
30export declare type AddNInputs = TensorInfo[];
31export declare const All = "All";
32export declare type AllInputs = Pick<NamedTensorInfoMap, 'x'>;
33export interface AllAttrs {
34 axis: number | number[];
35 keepDims: boolean;
36}
37export declare const Any = "Any";
38export declare type AnyInputs = Pick<NamedTensorInfoMap, 'x'>;
39export interface AnyAttrs {
40 axis: number | number[];
41 keepDims: boolean;
42}
43export declare const ArgMax = "ArgMax";
44export declare type ArgMaxInputs = Pick<NamedTensorInfoMap, 'x'>;
45export interface ArgMaxAttrs {
46 axis: number;
47}
48export declare const ArgMin = "ArgMin";
49export declare type ArgMinInputs = Pick<NamedTensorInfoMap, 'x'>;
50export interface ArgMinAttrs {
51 axis: number;
52}
53export declare const Asin = "Asin";
54export declare type AsinInputs = UnaryInputs;
55export declare const Asinh = "Asinh";
56export declare type AsinhInputs = UnaryInputs;
57export declare const Atan = "Atan";
58export declare type AtanInputs = UnaryInputs;
59export declare const Atanh = "Atanh";
60export declare type AtanhInputs = UnaryInputs;
61export declare const Atan2 = "Atan2";
62export declare type Atan2Inputs = BinaryInputs;
63export declare const AvgPool = "AvgPool";
64export declare type AvgPoolInputs = Pick<NamedTensorInfoMap, 'x'>;
65export interface AvgPoolAttrs {
66 filterSize: [number, number] | number;
67 strides: [number, number] | number;
68 pad: 'valid' | 'same' | number;
69 dimRoundingMode?: 'floor' | 'round' | 'ceil';
70}
71export declare const AvgPoolGrad = "AvgPoolGrad";
72export declare type AvgPoolGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input'>;
73export interface AvgPoolGradAttrs {
74 filterSize: [number, number] | number;
75 strides: [number, number] | number;
76 pad: 'valid' | 'same' | number;
77}
78export declare const AvgPool3D = "AvgPool3D";
79export declare type AvgPool3DInputs = Pick<NamedTensorInfoMap, 'x'>;
80export interface AvgPool3DAttrs {
81 filterSize: [number, number, number] | number;
82 strides: [number, number, number] | number;
83 pad: 'valid' | 'same' | number;
84 dimRoundingMode?: 'floor' | 'round' | 'ceil';
85 dataFormat: 'NDHWC' | 'NCDHW';
86}
87export declare const AvgPool3DGrad = "AvgPool3DGrad";
88export declare type AvgPool3DGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input'>;
89export interface AvgPool3DGradAttrs {
90 filterSize: [number, number, number] | number;
91 strides: [number, number, number] | number;
92 pad: 'valid' | 'same' | number;
93 dimRoundingMode?: 'floor' | 'round' | 'ceil';
94}
95export declare const BatchMatMul = "BatchMatMul";
96export declare type BatchMatMulInputs = Pick<NamedTensorInfoMap, 'a' | 'b'>;
97export interface BatchMatMulAttrs {
98 transposeA: boolean;
99 transposeB: boolean;
100}
101export declare const BatchToSpaceND = "BatchToSpaceND";
102export declare type BatchToSpaceNDInputs = Pick<NamedTensorInfoMap, 'x'>;
103export interface BatchToSpaceNDAttrs {
104 blockShape: number[];
105 crops: number[][];
106}
107export declare type BinaryInputs = Pick<NamedTensorInfoMap, 'a' | 'b'>;
108export declare const Bincount = "Bincount";
109export declare type BincountInputs = Pick<NamedTensorInfoMap, 'x' | 'weights'>;
110export interface BincountAttrs {
111 size: number;
112}
113export declare const BroadcastTo = "BroadcastTo";
114export declare type BroadcastToInputs = Pick<NamedTensorInfoMap, 'x'>;
115export interface BroadCastToAttrs {
116 shape: number[];
117 inputShape: number[];
118}
119export declare const Cast = "Cast";
120export declare type CastInputs = UnaryInputs;
121export interface CastAttrs {
122 dtype: DataType;
123}
124export declare const Ceil = "Ceil";
125export declare type CeilInputs = UnaryInputs;
126export declare const ClipByValue = "ClipByValue";
127export declare type ClipByValueInputs = UnaryInputs;
128export interface ClipByValueAttrs {
129 clipValueMin: number;
130 clipValueMax: number;
131}
132export declare const Complex = "Complex";
133export declare type ComplexInputs = Pick<NamedTensorInfoMap, 'real' | 'imag'>;
134export declare const ComplexAbs = "ComplexAbs";
135export declare type ComplexAbsInputs = UnaryInputs;
136export declare const Concat = "Concat";
137export declare type ConcatInputs = TensorInfo[];
138export interface ConcatAttrs {
139 axis: number;
140}
141export declare const Conv2D = "Conv2D";
142export declare type Conv2DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>;
143export interface Conv2DAttrs {
144 strides: [number, number] | number;
145 pad: 'valid' | 'same' | number | ExplicitPadding;
146 dataFormat: 'NHWC' | 'NCHW';
147 dilations: [number, number] | number;
148 dimRoundingMode?: 'floor' | 'round' | 'ceil';
149}
150export declare const Conv2DBackpropFilter = "Conv2DBackpropFilter";
151export declare type Conv2DBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>;
152export interface Conv2DBackpropFilterAttrs {
153 strides: [number, number] | number;
154 pad: 'valid' | 'same' | number | ExplicitPadding;
155 dataFormat: 'NHWC' | 'NCHW';
156 dimRoundingMode?: 'floor' | 'round' | 'ceil';
157 filterShape: [number, number, number, number];
158}
159export declare const Conv2DBackpropInput = "Conv2DBackpropInput";
160export declare type Conv2DBackpropInputInputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>;
161export interface Conv2DBackpropInputAttrs {
162 strides: [number, number] | number;
163 pad: 'valid' | 'same' | number | ExplicitPadding;
164 dataFormat: 'NHWC' | 'NCHW';
165 dimRoundingMode?: 'floor' | 'round' | 'ceil';
166 inputShape: [number, number, number, number];
167}
168export declare const Conv3D = "Conv3D";
169export declare type Conv3DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>;
170export interface Conv3DAttrs {
171 strides: [number, number, number] | number;
172 pad: 'valid' | 'same';
173 dataFormat: 'NDHWC' | 'NCDHW';
174 dilations: [number, number, number] | number;
175}
176export declare const Conv3DBackpropFilterV2 = "Conv3DBackpropFilterV2";
177export declare type Conv3DBackpropFilterV2Inputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>;
178export interface Conv3DBackpropFilterV2Attrs {
179 strides: [number, number, number] | number;
180 pad: 'valid' | 'same';
181 filterShape: [number, number, number, number, number];
182}
183export declare const Conv3DBackpropInputV2 = "Conv3DBackpropInputV2";
184export declare type Conv3DBackpropInputV2Inputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>;
185export interface Conv3DBackpropInputV2Attrs {
186 strides: [number, number, number] | number;
187 pad: 'valid' | 'same';
188 inputShape: [number, number, number, number, number];
189}
190export declare const Cos = "Cos";
191export declare type CosInputs = UnaryInputs;
192export declare const Cosh = "Cosh";
193export declare type CoshInputs = UnaryInputs;
194export declare const Cumsum = "Cumsum";
195export declare type CumsumInputs = Pick<NamedTensorInfoMap, 'x'>;
196export interface CumsumAttrs {
197 axis: number;
198 exclusive: boolean;
199 reverse: boolean;
200}
201export declare const CropAndResize = "CropAndResize";
202export declare type CropAndResizeInputs = Pick<NamedTensorInfoMap, 'image' | 'boxes' | 'boxInd'>;
203export interface CropAndResizeAttrs {
204 cropSize: [number, number];
205 method: 'bilinear' | 'nearest';
206 extrapolationValue: number;
207}
208export declare const DenseBincount = "DenseBincount";
209export declare type DenseBincountInputs = Pick<NamedTensorInfoMap, 'x' | 'weights'>;
210export interface DenseBincountAttrs {
211 size: number;
212 binaryOutput?: boolean;
213}
214export declare const DepthToSpace = "DepthToSpace";
215export declare type DepthToSpaceInputs = Pick<NamedTensorInfoMap, 'x'>;
216export interface DepthToSpaceAttrs {
217 blockSize: number;
218 dataFormat: 'NHWC' | 'NCHW';
219}
220export declare const DepthwiseConv2dNative = "DepthwiseConv2dNative";
221export declare type DepthwiseConv2dNativeInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>;
222export interface DepthwiseConv2dNativeAttrs {
223 strides: [number, number] | number;
224 pad: 'valid' | 'same' | number | ExplicitPadding;
225 dataFormat: 'NHWC' | 'NCHW';
226 dilations: [number, number] | number;
227 dimRoundingMode?: 'floor' | 'round' | 'ceil';
228}
229export declare const DepthwiseConv2dNativeBackpropFilter = "DepthwiseConv2dNativeBackpropFilter";
230export declare type DepthwiseConv2dNativeBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'dy'>;
231export interface DepthwiseConv2dNativeBackpropFilterAttrs {
232 strides: [number, number] | number;
233 dilations: [number, number] | number;
234 pad: 'valid' | 'same' | number | ExplicitPadding;
235 dimRoundingMode?: 'floor' | 'round' | 'ceil';
236 filterShape: [number, number, number, number];
237}
238export declare const DepthwiseConv2dNativeBackpropInput = "DepthwiseConv2dNativeBackpropInput";
239export declare type DepthwiseConv2dNativeBackpropInputInputs = Pick<NamedTensorInfoMap, 'dy' | 'filter'>;
240export interface DepthwiseConv2dNativeBackpropInputAttrs {
241 strides: [number, number] | number;
242 dilations: [number, number] | number;
243 pad: 'valid' | 'same' | number | ExplicitPadding;
244 dimRoundingMode?: 'floor' | 'round' | 'ceil';
245 inputShape: [number, number, number, number];
246}
247export declare const Diag = "Diag";
248export declare type DiagInputs = Pick<NamedTensorInfoMap, 'x'>;
249export declare const Dilation2D = "Dilation2D";
250export declare type Dilation2DInputs = Pick<NamedTensorInfoMap, 'x' | 'filter'>;
251export interface Dilation2DAttrs {
252 strides: [number, number] | number;
253 pad: 'valid' | 'same' | number;
254 dilations: [number, number] | number;
255}
256export declare const Dilation2DBackpropInput = "Dilation2DBackpropInput";
257export declare type Dilation2DBackpropInputInputs = Pick<NamedTensorInfoMap, 'x' | 'filter' | 'dy'>;
258export declare const Dilation2DBackpropFilter = "Dilation2DBackpropFilter";
259export declare type Dilation2DBackpropFilterInputs = Pick<NamedTensorInfoMap, 'x' | 'filter' | 'dy'>;
260export declare const RealDiv = "RealDiv";
261export declare type RealDivInputs = BinaryInputs;
262export declare const Einsum = "Einsum";
263export declare type EinsumInputs = TensorInfo[];
264export interface EinsumAttrs {
265 equation: string;
266}
267export declare const Elu = "Elu";
268export declare type EluInputs = Pick<NamedTensorInfoMap, 'x'>;
269export declare const EluGrad = "EluGrad";
270export declare type EluGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'y'>;
271export declare const Erf = "Erf";
272export declare type ErfInputs = UnaryInputs;
273export declare const Equal = "Equal";
274export declare type EqualInputs = BinaryInputs;
275export declare const Exp = "Exp";
276export declare type ExpInputs = UnaryInputs;
277export declare const ExpandDims = "ExpandDims";
278export declare type ExpandDimsInputs = Pick<NamedTensorInfoMap, 'input'>;
279export interface ExpandDimsAttrs {
280 dim: number;
281}
282export declare const Expm1 = "Expm1";
283export declare type Expm1Inputs = UnaryInputs;
284export declare const FFT = "FFT";
285export declare type FFTInputs = Pick<NamedTensorInfoMap, 'input'>;
286export declare const Fill = "Fill";
287export interface FillAttrs {
288 shape: number[];
289 value: number | string;
290 dtype: DataType;
291}
292export declare const FlipLeftRight = "FlipLeftRight";
293export declare type FlipLeftRightInputs = Pick<NamedTensorInfoMap, 'image'>;
294export declare const Floor = "Floor";
295export declare type FloorInputs = UnaryInputs;
296export declare const FloorDiv = "FloorDiv";
297export declare type FloorDivInputs = BinaryInputs;
298export declare const FusedBatchNorm = "FusedBatchNorm";
299export declare type FusedBatchNormInputs = Pick<NamedTensorInfoMap, 'x' | 'scale' | 'offset' | 'mean' | 'variance'>;
300export interface FusedBatchNormAttrs {
301 varianceEpsilon: number;
302}
303export declare const GatherV2 = "GatherV2";
304export declare type GatherV2Inputs = Pick<NamedTensorInfoMap, 'x' | 'indices'>;
305export interface GatherV2Attrs {
306 axis: number;
307 batchDims: number;
308}
309export declare const GatherNd = "GatherNd";
310export declare type GatherNdInputs = Pick<NamedTensorInfoMap, 'params' | 'indices'>;
311export declare const Greater = "Greater";
312export declare type GreaterInputs = BinaryInputs;
313export declare const GreaterEqual = "GreaterEqual";
314export declare type GreaterEqualInputs = BinaryInputs;
315export declare const Identity = "Identity";
316export declare type IdentityInputs = Pick<NamedTensorInfoMap, 'x'>;
317export declare const IFFT = "IFFT";
318export declare type IFFTInputs = Pick<NamedTensorInfoMap, 'input'>;
319export declare const Imag = "Imag";
320export declare type ImagInputs = Pick<NamedTensorInfoMap, 'input'>;
321export declare const IsFinite = "IsFinite";
322export declare type IsFiniteInputs = UnaryInputs;
323export declare const IsInf = "IsInf";
324export declare type IsInfInputs = UnaryInputs;
325export declare const IsNan = "IsNan";
326export declare type IsNanInputs = UnaryInputs;
327export declare const LeakyRelu = "LeakyRelu";
328export declare type LeakyReluInputs = Pick<NamedTensorInfoMap, 'x'>;
329export interface LeakyReluAttrs {
330 alpha: number;
331}
332export declare const Less = "Less";
333export declare type LessInputs = BinaryInputs;
334export declare const LessEqual = "LessEqual";
335export declare type LessEqualInputs = BinaryInputs;
336export declare const LinSpace = "LinSpace";
337export interface LinSpaceAttrs {
338 start: number;
339 stop: number;
340 num: number;
341}
342export declare const Log = "Log";
343export declare type LogInputs = UnaryInputs;
344export declare const Log1p = "Log1p";
345export declare type Log1pInputs = UnaryInputs;
346export declare const LogicalAnd = "LogicalAnd";
347export declare type LogicalAndInputs = BinaryInputs;
348export declare const LogicalNot = "LogicalNot";
349export declare type LogicalNotInputs = Pick<NamedTensorInfoMap, 'x'>;
350export declare const LogicalOr = "LogicalOr";
351export declare type LogicalOrInputs = BinaryInputs;
352export declare const LogSoftmax = "LogSoftmax";
353export declare type LogSoftmaxInputs = Pick<NamedTensorInfoMap, 'logits'>;
354export interface LogSoftmaxAttrs {
355 axis: number;
356}
357export declare const LRN = "LRN";
358export declare type LRNInputs = Pick<NamedTensorInfoMap, 'x'>;
359export interface LRNAttrs {
360 depthRadius: number;
361 bias: number;
362 alpha: number;
363 beta: number;
364}
365export declare const LRNGrad = "LRNGrad";
366export declare type LRNGradInputs = Pick<NamedTensorInfoMap, 'x' | 'y' | 'dy'>;
367export interface LRNGradAttrs {
368 depthRadius: number;
369 bias: number;
370 alpha: number;
371 beta: number;
372}
373export declare const Max = "Max";
374export declare type MaxInputs = Pick<NamedTensorInfoMap, 'x'>;
375export interface MaxAttrs {
376 reductionIndices: number | number[];
377 keepDims: boolean;
378}
379export declare const Maximum = "Maximum";
380export declare type MaximumInputs = BinaryInputs;
381export declare const MaxPool = "MaxPool";
382export declare type MaxPoolInputs = Pick<NamedTensorInfoMap, 'x'>;
383export interface MaxPoolAttrs {
384 filterSize: [number, number] | number;
385 strides: [number, number] | number;
386 pad: 'valid' | 'same' | number;
387 dimRoundingMode?: 'floor' | 'round' | 'ceil';
388}
389export declare const MaxPoolGrad = "MaxPoolGrad";
390export declare type MaxPoolGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input' | 'output'>;
391export interface MaxPoolGradAttrs {
392 filterSize: [number, number] | number;
393 strides: [number, number] | number;
394 pad: 'valid' | 'same' | number;
395 dimRoundingMode?: 'floor' | 'round' | 'ceil';
396}
397export declare const MaxPool3D = "MaxPool3D";
398export declare type MaxPool3DInputs = Pick<NamedTensorInfoMap, 'x'>;
399export interface MaxPool3DAttrs {
400 filterSize: [number, number, number] | number;
401 strides: [number, number, number] | number;
402 pad: 'valid' | 'same' | number;
403 dataFormat: 'NDHWC' | 'NCDHW';
404 dimRoundingMode?: 'floor' | 'round' | 'ceil';
405}
406export declare const MaxPool3DGrad = "MaxPool3DGrad";
407export declare type MaxPool3DGradInputs = Pick<NamedTensorInfoMap, 'dy' | 'input' | 'output'>;
408export interface MaxPool3DGradAttrs {
409 filterSize: [number, number, number] | number;
410 strides: [number, number, number] | number;
411 pad: 'valid' | 'same' | number;
412 dimRoundingMode?: 'floor' | 'round' | 'ceil';
413}
414export declare const MaxPoolWithArgmax = "MaxPoolWithArgmax";
415export declare type MaxPoolWithArgmaxInputs = Pick<NamedTensorInfoMap, 'x'>;
416export interface MaxPoolWithArgmaxAttrs {
417 filterSize: [number, number] | number;
418 strides: [number, number] | number;
419 pad: 'valid' | 'same' | number;
420 includeBatchInIndex: boolean;
421}
422export declare const Mean = "Mean";
423export declare type MeanInputs = Pick<NamedTensorInfoMap, 'x'>;
424export interface MeanAttrs {
425 axis: number | number[];
426 keepDims: boolean;
427}
428export declare const Min = "Min";
429export declare type MinInputs = Pick<NamedTensorInfoMap, 'x'>;
430export interface MinAttrs {
431 axis: number | number[];
432 keepDims: boolean;
433}
434export declare const Minimum = "Minimum";
435export declare type MinimumInputs = BinaryInputs;
436export declare const MirrorPad = "MirrorPad";
437export declare type MirrorPadInputs = Pick<NamedTensorInfoMap, 'x'>;
438export interface MirrorPadAttrs {
439 paddings: Array<[number, number]>;
440 mode: 'reflect' | 'symmetric';
441}
442export declare const Mod = "Mod";
443export declare type ModInputs = BinaryInputs;
444export declare const Multinomial = "Multinomial";
445export declare type MultinomialInputs = Pick<NamedTensorInfoMap, 'logits'>;
446export interface MultinomialAttrs {
447 numSamples: number;
448 seed: number;
449 normalized: boolean;
450}
451export declare const Multiply = "Multiply";
452export declare type MultiplyInputs = BinaryInputs;
453export declare const Neg = "Neg";
454export declare type NegInputs = UnaryInputs;
455export declare const NotEqual = "NotEqual";
456export declare type NotEqualInputs = BinaryInputs;
457export declare const NonMaxSuppressionV3 = "NonMaxSuppressionV3";
458export declare type NonMaxSuppressionV3Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>;
459export interface NonMaxSuppressionV3Attrs {
460 maxOutputSize: number;
461 iouThreshold: number;
462 scoreThreshold: number;
463}
464export declare const NonMaxSuppressionV4 = "NonMaxSuppressionV4";
465export declare type NonMaxSuppressionV4Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>;
466export interface NonMaxSuppressionV4Attrs {
467 maxOutputSize: number;
468 iouThreshold: number;
469 scoreThreshold: number;
470 padToMaxOutputSize: boolean;
471}
472export declare const NonMaxSuppressionV5 = "NonMaxSuppressionV5";
473export declare type NonMaxSuppressionV5Inputs = Pick<NamedTensorInfoMap, 'boxes' | 'scores'>;
474export interface NonMaxSuppressionV5Attrs {
475 maxOutputSize: number;
476 iouThreshold: number;
477 scoreThreshold: number;
478 softNmsSigma: number;
479}
480export declare const OnesLike = "OnesLike";
481export declare type OnesLikeInputs = UnaryInputs;
482export declare const OneHot = "OneHot";
483export declare type OneHotInputs = Pick<NamedTensorInfoMap, 'indices'>;
484export interface OneHotAttrs {
485 depth: number;
486 onValue: number;
487 offValue: number;
488}
489export declare const Pack = "Pack";
490export declare type PackInputs = TensorInfo[];
491export interface PackAttrs {
492 axis: number;
493}
494export declare const PadV2 = "PadV2";
495export declare type PadV2Inputs = Pick<NamedTensorInfoMap, 'x'>;
496export interface PadV2Attrs {
497 paddings: Array<[number, number]>;
498 constantValue: number;
499}
500export declare const Pool = "Pool";
501export declare type PoolInputs = Pick<NamedTensorInfoMap, 'input'>;
502export declare const Pow = "Pow";
503export declare type PowInputs = BinaryInputs;
504export declare const Prelu = "Prelu";
505export declare type PreluInputs = Pick<NamedTensorInfoMap, 'x' | 'alpha'>;
506export declare const Prod = "Prod";
507export declare type ProdInputs = Pick<NamedTensorInfoMap, 'x'>;
508export interface ProdAttrs {
509 axis: number | number[];
510 keepDims: boolean;
511}
512export declare const Range = "Range";
513export interface RangeAttrs {
514 start: number;
515 stop: number;
516 step: number;
517 dtype: 'float32' | 'int32';
518}
519export declare const Real = "Real";
520export declare type RealInputs = Pick<NamedTensorInfoMap, 'input'>;
521export declare const Reciprocal = "Reciprocal";
522export declare type ReciprocalInputs = UnaryInputs;
523export declare const Relu = "Relu";
524export declare type ReluInputs = Pick<NamedTensorInfoMap, 'x'>;
525export declare const Reshape = "Reshape";
526export declare type ReshapeInputs = Pick<NamedTensorInfoMap, 'x'>;
527export interface ReshapeAttrs {
528 shape: number[];
529}
530export declare const ResizeNearestNeighbor = "ResizeNearestNeighbor";
531export declare type ResizeNearestNeighborInputs = Pick<NamedTensorInfoMap, 'images'>;
532export interface ResizeNearestNeighborAttrs {
533 alignCorners: boolean;
534 halfPixelCenters: boolean;
535 size: [number, number];
536}
537export declare const ResizeNearestNeighborGrad = "ResizeNearestNeighborGrad";
538export declare type ResizeNearestNeighborGradInputs = Pick<NamedTensorInfoMap, 'images' | 'dy'>;
539export declare type ResizeNearestNeighborGradAttrs = ResizeNearestNeighborAttrs;
540export declare const ResizeBilinear = "ResizeBilinear";
541export declare type ResizeBilinearInputs = Pick<NamedTensorInfoMap, 'images'>;
542export interface ResizeBilinearAttrs {
543 alignCorners: boolean;
544 halfPixelCenters: boolean;
545 size: [number, number];
546}
547export declare const ResizeBilinearGrad = "ResizeBilinearGrad";
548export declare type ResizeBilinearGradInputs = Pick<NamedTensorInfoMap, 'images' | 'dy'>;
549export declare type ResizeBilinearGradAttrs = ResizeBilinearAttrs;
550export declare const Relu6 = "Relu6";
551export declare type Relu6Inputs = Pick<NamedTensorInfoMap, 'x'>;
552export declare const Reverse = "Reverse";
553export declare type ReverseInputs = Pick<NamedTensorInfoMap, 'x'>;
554export interface ReverseAttrs {
555 dims: number | number[];
556}
557export declare const Round = "Round";
558export declare type RoundInputs = UnaryInputs;
559export declare const Rsqrt = "Rsqrt";
560export declare type RsqrtInputs = UnaryInputs;
561export declare const ScatterNd = "ScatterNd";
562export declare type ScatterNdInputs = Pick<NamedTensorInfoMap, 'indices' | 'updates'>;
563export interface ScatterNdAttrs {
564 shape: number[];
565}
566export declare const Select = "Select";
567export declare type SelectInputs = Pick<NamedTensorInfoMap, 'condition' | 't' | 'e'>;
568export declare const Selu = "Selu";
569export declare type SeluInputs = Pick<NamedTensorInfoMap, 'x'>;
570export declare const Slice = "Slice";
571export declare type SliceInputs = Pick<NamedTensorInfoMap, 'x'>;
572export interface SliceAttrs {
573 begin: number | number[];
574 size: number | number[];
575}
576export declare const Sin = "Sin";
577export declare type SinInputs = UnaryInputs;
578export declare const Sinh = "Sinh";
579export declare type SinhInputs = UnaryInputs;
580export declare const Sign = "Sign";
581export declare type SignInputs = UnaryInputs;
582export declare const Sigmoid = "Sigmoid";
583export declare type SigmoidInputs = UnaryInputs;
584export declare const Softplus = "Softplus";
585export declare type SoftplusInputs = UnaryInputs;
586export declare const Sqrt = "Sqrt";
587export declare type SqrtInputs = UnaryInputs;
588export declare const Sum = "Sum";
589export declare type SumInputs = Pick<NamedTensorInfoMap, 'x'>;
590export interface SumAttrs {
591 axis: number | number[];
592 keepDims: boolean;
593}
594export declare const SpaceToBatchND = "SpaceToBatchND";
595export declare type SpaceToBatchNDInputs = Pick<NamedTensorInfoMap, 'x'>;
596export interface SpaceToBatchNDAttrs {
597 blockShape: number[];
598 paddings: number[][];
599}
600export declare const SplitV = "SplitV";
601export declare type SplitVInputs = Pick<NamedTensorInfoMap, 'x'>;
602export interface SplitVAttrs {
603 numOrSizeSplits: number[] | number;
604 axis: number;
605}
606export declare const Softmax = "Softmax";
607export declare type SoftmaxInputs = Pick<NamedTensorInfoMap, 'logits'>;
608export interface SoftmaxAttrs {
609 dim: number;
610}
611export declare const SparseFillEmptyRows = "SparseFillEmptyRows";
612export declare type SparseFillEmptyRowsInputs = Pick<NamedTensorInfoMap, 'indices' | 'values' | 'denseShape' | 'defaultValue'>;
613export declare const SparseReshape = "SparseReshape";
614export declare type SparseReshapeInputs = Pick<NamedTensorInfoMap, 'inputIndices' | 'inputShape' | 'newShape'>;
615export declare const SparseSegmentMean = "SparseSegmentMean";
616export declare type SparseSegmentMeanInputs = Pick<NamedTensorInfoMap, 'data' | 'indices' | 'segmentIds'>;
617export declare const SparseSegmentSum = "SparseSegmentSum";
618export declare type SparseSegmentSumInputs = Pick<NamedTensorInfoMap, 'data' | 'indices' | 'segmentIds'>;
619export declare const SparseToDense = "SparseToDense";
620export declare type SparseToDenseInputs = Pick<NamedTensorInfoMap, 'sparseIndices' | 'sparseValues' | 'defaultValue'>;
621export interface SparseToDenseAttrs {
622 outputShape: number[];
623}
624export declare const SquaredDifference = "SquaredDifference";
625export declare type SquaredDifferenceInputs = BinaryInputs;
626export declare const Square = "Square";
627export declare type SquareInputs = Pick<NamedTensorInfoMap, 'x'>;
628export declare const StridedSlice = "StridedSlice";
629export declare type StridedSliceInputs = Pick<NamedTensorInfoMap, 'x'>;
630export interface StridedSliceAttrs {
631 begin: number[];
632 end: number[];
633 strides: number[];
634 beginMask: number;
635 endMask: number;
636 ellipsisMask: number;
637 newAxisMask: number;
638 shrinkAxisMask: number;
639}
640export declare const StringNGrams = "StringNGrams";
641export declare type StringNGramsInputs = Pick<NamedTensorInfoMap, 'data' | 'dataSplits'>;
642export interface StringNGramsAttrs {
643 separator: string;
644 nGramWidths: number[];
645 leftPad: string;
646 rightPad: string;
647 padWidth: number;
648 preserveShortSequences: boolean;
649}
650export declare const StringSplit = "StringSplit";
651export declare type StringSplitInputs = Pick<NamedTensorInfoMap, 'input' | 'delimiter'>;
652export interface StringSplitAttrs {
653 skipEmpty: boolean;
654}
655export declare const StringToHashBucketFast = "StringToHashBucketFast";
656export declare type StringToHashBucketFastInputs = Pick<NamedTensorInfoMap, 'input'>;
657export interface StringToHashBucketFastAttrs {
658 numBuckets: number;
659}
660export declare const Sub = "Sub";
661export declare type SubInputs = BinaryInputs;
662export declare const Tan = "Tan";
663export declare type TanInputs = UnaryInputs;
664export declare const Tanh = "Tanh";
665export declare type TanhInputs = UnaryInputs;
666export declare const Tile = "Tile";
667export declare type TileInputs = Pick<NamedTensorInfoMap, 'x'>;
668export interface TileAttrs {
669 reps: number[];
670}
671export declare const TopK = "TopK";
672export declare type TopKInputs = Pick<NamedTensorInfoMap, 'x'>;
673export interface TopKAttrs {
674 k: number;
675 sorted: boolean;
676}
677export declare const Transform = "Transform";
678export declare type TransformInputs = Pick<NamedTensorInfoMap, 'image' | 'transforms'>;
679export interface TransformAttrs {
680 interpolation: 'nearest' | 'bilinear';
681 fillMode: 'constant' | 'reflect' | 'wrap' | 'nearest';
682 fillValue: number;
683 outputShape?: [number, number];
684}
685export declare const Transpose = "Transpose";
686export declare type TransposeInputs = Pick<NamedTensorInfoMap, 'x'>;
687export interface TransposeAttrs {
688 perm: number[];
689}
690export declare const Unique = "Unique";
691export declare type UniqueInputs = Pick<NamedTensorInfoMap, 'x'>;
692export interface UniqueAttrs {
693 axis: number;
694}
695export declare type UnaryInputs = Pick<NamedTensorInfoMap, 'x'>;
696export declare const Unpack = "Unpack";
697export declare type UnpackInputs = Pick<NamedTensorInfoMap, 'value'>;
698export interface UnpackAttrs {
699 axis: number;
700}
701export declare const UnsortedSegmentSum = "UnsortedSegmentSum";
702export declare type UnsortedSegmentSumInputs = Pick<NamedTensorInfoMap, 'x' | 'segmentIds'>;
703export interface UnsortedSegmentSumAttrs {
704 numSegments: number;
705}
706export declare const ZerosLike = "ZerosLike";
707export declare type ZerosLikeInputs = UnaryInputs;
708/**
709 * TensorFlow.js-only kernels
710 */
711export declare const Step = "Step";
712export declare type StepInputs = UnaryInputs;
713export interface StepAttrs {
714 alpha: number;
715}
716export declare const FromPixels = "FromPixels";
717export interface FromPixelsInputs {
718 pixels: PixelData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;
719}
720export interface FromPixelsAttrs {
721 numChannels: number;
722}
723export declare const RotateWithOffset = "RotateWithOffset";
724export declare type RotateWithOffsetInputs = Pick<NamedTensorInfoMap, 'image'>;
725export interface RotateWithOffsetAttrs {
726 radians: number;
727 fillValue: number | [number, number, number];
728 center: number | [number, number];
729}
730export declare const _FusedMatMul = "_FusedMatMul";
731export interface _FusedMatMulInputs extends NamedTensorInfoMap {
732 a: TensorInfo;
733 b: TensorInfo;
734 bias?: TensorInfo;
735 preluActivationWeights?: TensorInfo;
736}
737export interface _FusedMatMulAttrs {
738 transposeA: boolean;
739 transposeB: boolean;
740 activation: Activation;
741 leakyreluAlpha?: number;
742}
743export declare const FusedConv2D = "FusedConv2D";
744export interface FusedConv2DInputs extends NamedTensorInfoMap {
745 x: TensorInfo;
746 filter: TensorInfo;
747 bias?: TensorInfo;
748 preluActivationWeights?: TensorInfo;
749}
750export interface FusedConv2DAttrs {
751 strides: [number, number] | number;
752 pad: 'valid' | 'same' | number | ExplicitPadding;
753 dataFormat: 'NHWC' | 'NCHW';
754 dilations: [number, number] | number;
755 dimRoundingMode: 'floor' | 'round' | 'ceil';
756 activation: Activation;
757 leakyreluAlpha?: number;
758}
759export declare const FusedDepthwiseConv2D = "FusedDepthwiseConv2D";
760export interface FusedDepthwiseConv2DInputs extends NamedTensorInfoMap {
761 x: TensorInfo;
762 filter: TensorInfo;
763 bias?: TensorInfo;
764 preluActivationWeights?: TensorInfo;
765}
766export interface FusedDepthwiseConv2DAttrs {
767 strides: [number, number] | number;
768 pad: 'valid' | 'same' | number | ExplicitPadding;
769 dataFormat: 'NHWC' | 'NCHW';
770 dilations: [number, number] | number;
771 dimRoundingMode: 'floor' | 'round' | 'ceil';
772 activation: Activation;
773 leakyreluAlpha?: number;
774}