UNPKG

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