Interface Core#

interface Core {
    compileModel(model, deviceName, config?): Promise<CompiledModel>;
    compileModelSync(model, deviceName, config?): CompiledModel;
    getAvailableDevices(): string[];
    getProperty(propertyName): string | number | boolean;
    getProperty(deviceName, propertyName): string | number | boolean;
    importModelSync(modelStream, device): CompiledModel;
    readModel(modelPath, weightsPath?): Promise<Model>;
    readModel(modelBuffer, weightsBuffer?): Promise<Model>;
    readModelSync(modelPath, weightsPath?): Model;
    readModelSync(modelBuffer, weightsBuffer?): Model;
    setProperty(props): void;
    setProperty(deviceName, props): void;
}

Methods#

compileModel

compileModel(model, device, config?): Promise<CompiledModel>
  • Parameters:

    • model: Model

    • device: string

    • Optional

      config: {
          [option: string]: string;
      }
      
    • [option: string]:string

  • Returns: Promise<CompiledModel >

  • Defined in: addon.ts:24

compileModelSync

compileModelSync(model, device, config?): CompiledModel
  • Parameters:

    • model: Model

    • device: string

    • Optional

      config: {
                [option: string]: string;
       }
      
    • [option: string]:string

  • Returns: CompiledModel

  • Defined in: addon.ts:29

getAvailableDevices

getAvailableDevices(): string[]

getProperty

getProperty(propertyName): string | number | boolean
  • Parameters:

    • propertyName: string

  • Returns: string | number | boolean

  • Defined in: addon.ts:57

getProperty(deviceName, propertyName): string | number | boolean
  • Parameters:

    • deviceName: string

    • propertyName: string

  • Returns: string | number | boolean

  • Defined in: addon.ts:58

importModelSync

importModelSync(modelStream, device): CompiledModel
  • Parameters:

    • modelStream: Buffer

    • device: string

  • Returns: CompiledModel

  • Defined in: addon.ts:39

importModelSync(modelStream: Buffer, device: string, props: { [key: string]: string | number | boolean }): CompiledModel

Parameters:

  • modelStream: Buffer

  • device: string

  • props: {
             [key: string]: string | number | boolean;
    }
    

Returns: CompiledModel

readModel

readModel(modelPath, weightsPath?): Promise<Model>
  • Parameters:

    • modelPath: string

    • Optional

      weightsPath: string
      
  • Returns: Promise<Model>

  • Defined in: addon.ts:34

readModel(modelBuffer, weightsBuffer?): Promise<Model>
  • Parameters:

    • modelBuffer: Uint8Array

    • Optional

      weightsBuffer: Uint8Array
      
  • Returns: Promise<Model>

  • Defined in: addon.ts:35

readModelSync

readModelSync(modelPath, weightsPath?): Model
  • Parameters:

    • modelPath: string

    • Optional

      weightsPath: string
      
  • Returns: Model

  • Defined in: addon.ts:37

readModelSync(modelBuffer, weightsBuffer?): Model
  • Parameters:

    • modelBuffer: Uint8Array

    • Optional

      weightsBuffer: Uint8Array
      
  • Returns: Model

  • Defined in: addon.ts:38

setProperty

setProperty(props): void
  • Parameters:

    • props: {
               [key: string]: string | number | boolean;
      }
      
      • [key: string]: string | number | boolean

  • Returns: void

  • Defined in: addon.ts:52

setProperty(deviceName, props): void
  • Parameters:

    • deviceName: string

    • props: {
               [key: string]: string | number | boolean;
      }
      
      • [key: string]: string | number | boolean

  • Returns: string | number | boolean

  • Defined in: addon.ts:53