@hoff97/tensor-js
Version:
PyTorch like deep learning inferrence library
29 lines (28 loc) • 1.17 kB
TypeScript
import { DTypeGpu, GPUTensorConstructor, GPUTensorI } from '../../../tensor/gpu/interface';
import { GPUMemoryAllocator } from '../../../tensor/gpu/memory';
import { Input, Operation } from '../operation';
export interface UpsampleInfo {
shapeX?: readonly number[];
widthX?: number;
heightX?: number;
shapeOutput?: readonly number[];
widthOutput?: number;
heightOutput?: number;
scales?: readonly number[];
}
export interface UpsampleInput {
X: GPUTensorI;
scales: readonly number[];
}
export declare class UpsampleOperation<GPUTensor extends GPUTensorI> extends Operation<GPUTensor, UpsampleInfo, UpsampleInput> {
constructor(tensorConstructor: GPUTensorConstructor<GPUTensor>, dtype: DTypeGpu, allocator?: GPUMemoryAllocator);
getFragmentShader(info: UpsampleInfo): string;
getTextureNames(): string[];
getVariables(): string;
getUniformAttrs(): Input[];
calc(input: UpsampleInput): GPUTensor;
getOutputShape(input: UpsampleInput): readonly number[];
compile(info: UpsampleInfo): void;
getCompilationInfo(input: UpsampleInput): UpsampleInfo;
getInputInfoString(input: UpsampleInput): string;
}