license import { BaseTaskLibrary } from './common' ; /** TFLiteWebModelRunner class type. */ export declare interface TFLiteWebModelRunnerClass { param model param options create ( model , options ) : Promise < TFLiteWebModelRunner > ; } /**
 * The main TFLiteWebModelRunner class interface.
 *
 * It is a wrapper around TFLite Interpreter. See
 * https://www.tensorflow.org/lite/guide/inference for more info about related
 * concepts.
 */ export declare interface TFLiteWebModelRunner extends BaseTaskLibrary { /** Gets model inputs. */ getInputs ( ) : TFLiteWebModelRunnerTensorInfo [ ] ; /** Gets model outputs. */ getOutputs ( ) : TFLiteWebModelRunnerTensorInfo [ ] ; return infer ( ) : boolean ; /**
     * Gets per-node profiling results.
     *
     * This is only useful when TFLiteWebModelRunnerOptions.enableProfiling is
     * set to true.
     */ getProfilingResults ( ) : ProfileItem [ ] ; /**
     * Gets the profiling summary.
     *
     * This is only useful when TFLiteWebModelRunnerOptions.enableProfiling is
     * set to true.
     */ getProfilingSummary ( ) : string ; } export declare interface ProfileItem { /** The type of the node, e.g. "CONV_2D". */ nodeType : string ; /** The name of the node, e.g. "MobilenetV1/MobilenetV1/Conv2d_0/Relu6". */ nodeName : string ; /** The execution time (in ms) of the node. */ nodeExecMs : number ; } /** Options for TFLiteWebModelRunner. */ export declare interface TFLiteWebModelRunnerOptions { /**
     * Number of threads to use when running inference.
     *
     * Default to number of physical CPU cores, or -1 if WASM multi-threading is
     * not supported by user's browser.
     */ numThreads ? : number ; /**
     * Whether to enable profiling.
     *
     * Default to false. After it is enabled, the profiling results can be
     * retrieved by calling TFLiteWebModelRunner.getProfilingResults or
     * TFLiteWebModelRunner.getProfilingSummary. See their comments for more
     * details.
     */ enableProfiling ? : boolean ; /**
     * Maximum nmber of entries that the profiler can keep.
     *
     * Default to 1024.
     */ maxProfilingBufferEntries ? : number ; } /** Types of TFLite tensor data. */ export type TFLiteDataType = 'int8' | 'uint8' | 'bool' | 'int16' | 'int32' | 'uint32' | 'float32' | 'float64' ; /** Stores metadata for a TFLite tensor. */ export declare interface TFLiteWebModelRunnerTensorInfo { /** The id of the tensor (generated by TFLite runtime). */ id : number ; /** TFLite data type. */ dataType : TFLiteDataType ; /** The name of the TFLite tensor. */ name : string ; /** The shape of the tensor in string form, e.g. "2,3,5". */ shape : string ; /** Gets the direct access to the underlying buffer. */ data ( ) : Int8Array | Uint8Array | Int16Array | Int32Array | Uint32Array | Float32Array | Float64Array ; }