/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { FromSchema } from "../json-schema/FromSchema"; import { TypedArraySchemaOptions } from "./TypedArray"; export declare const TensorType: { readonly FLOAT16: "float16"; readonly FLOAT32: "float32"; readonly FLOAT64: "float64"; readonly INT8: "int8"; readonly UINT8: "uint8"; readonly INT16: "int16"; readonly UINT16: "uint16"; }; export type TensorType = (typeof TensorType)[keyof typeof TensorType]; /** * Tensor schema for representing tensors as arrays of numbers * @param annotations - Additional annotations for the schema * @returns The tensor schema */ export declare const TensorSchema: (annotations?: Record) => { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly enum: ("float16" | "float32" | "float64" | "int16" | "int8" | "uint16" | "uint8")[]; readonly title: "Type"; readonly description: "The type of the tensor"; }; readonly data: { readonly type: "array"; readonly format: "TypedArray"; readonly title: "Typed Array"; readonly description: "A typed array (Float32Array, Int8Array, etc.)"; }; readonly shape: { readonly type: "array"; readonly items: { readonly type: "number"; }; readonly title: "Shape"; readonly description: "The shape of the tensor (dimensions)"; readonly minItems: 1; readonly default: readonly [1]; }; readonly normalized: { readonly type: "boolean"; readonly title: "Normalized"; readonly description: "Whether the tensor data is normalized"; readonly default: false; }; }; readonly required: readonly ["data"]; readonly additionalProperties: false; }; export type Tensor = FromSchema, TypedArraySchemaOptions>; //# sourceMappingURL=Tensor.d.ts.map