UNPKG

@hoff97/tensor-js

Version:

PyTorch like deep learning inferrence library

26 lines (25 loc) 1.06 kB
import { DTypeGpu, GPUTensorConstructor, GPUTensorI } from '../../../tensor/gpu/interface'; import { GPUMemoryAllocator } from '../../../tensor/gpu/memory'; import { Operation } from '../operation'; export interface ExpandInfo { shapeX?: readonly number[]; widthX?: number; heightX?: number; shapeOutput?: readonly number[]; widthOutput?: number; heightOutput?: number; } export interface ExpandInput { input: GPUTensorI; outputShape: readonly number[]; } export declare class ExpandOperation<GPUTensor extends GPUTensorI> extends Operation<GPUTensor, ExpandInfo, ExpandInput> { constructor(tensorConstructor: GPUTensorConstructor<GPUTensor>, dtype: DTypeGpu, allocator?: GPUMemoryAllocator); getFragmentShader(info: ExpandInfo): string; getTextureNames(): string[]; calc(input: ExpandInput): GPUTensor; getOutputShape(input: ExpandInput): readonly number[]; compile(info: ExpandInfo): void; getCompilationInfo(input: ExpandInput): ExpandInfo; getInputInfoString(input: ExpandInput): string; }