Interface Core#

interface Core {
    compileModel(model, device, config?): Promise<CompiledModel>;
    compileModelSync(model, device, config?): CompiledModel;
    readModel(modelPath, weightsPath?): Promise<Model>;
    readModel(modelBuffer, weightsBuffer?): Promise<Model>;
    readModelSync(modelPath, weightsPath?): Model;
    readModelSync(modelBuffer, weightsBuffer?): Model;
}}

Methods#

compileModel

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

Parameters

  • model: Model

  • device: string

  • Optional

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

Returns Promise<CompiledModel >

compileModelSync

compileModelSync(model, device, config?): CompiledModel

Parameters

  • model: Model

  • device: string

  • Optional

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

Returns CompiledModel

readModel

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

Parameters

  • modelPath: string

  • Optional

weightsPath: string

Returns Promise<Model>

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

Parameters

  • modelBuffer: Uint8Array

  • Optional

    weightsBuffer: Uint8Array
    

Returns Promise<Model>

readModelSync

readModelSync(modelPath, weightsPath?): Model

Parameters

  • modelPath: string

  • Optional

    weightsPath: string
    

Returns Model

readModelSync(modelBuffer, weightsBuffer?): Model

Parameters

  • modelBuffer: Uint8Array

  • Optional

    weightsBuffer: Uint8Array
    

Returns Model