Firebase 機器學習功能。
函式
函式 | 說明 |
---|---|
getMachineLearning(應用程式) | 取得預設應用程式或特定應用程式的 MachineLearning 服務。getMachineLearning() 可以呼叫 getMachineLearning() ,而無需使用引數來存取預設應用程式的 MachineLearning 服務,或當做 getMachineLearning(app) 以存取與特定應用程式相關聯的 MachineLearning 服務。 |
等級
類別 | 說明 |
---|---|
機器學習 | Firebase MachineLearning 服務介面。 |
型號 | Firebase ML 模型輸出物件。 |
介面
介面 | 說明 |
---|---|
GcsTfliteModelOptions | |
ListModelsOptions | 代表列出模型選項的介面。 |
ListModelsResult | listModels 作業的回應物件。 |
ModelOptionsBase | Firebase ML 模型輸入物件 |
TFLiteModel | TensorFlow Lite 模型輸出物件 |
類型別名
類型別名 | 說明 |
---|---|
ModelOptions |
getMachineLearning(應用程式)
取得預設應用程式或特定應用程式的 MachineLearning 服務。
呼叫 getMachineLearning()
時無需引數,即可存取預設應用程式的 MachineLearning
服務,或做為 getMachineLearning(app)
存取與特定應用程式相關聯的 MachineLearning
服務。
簽名:
export declare function getMachineLearning(app?: App): MachineLearning;
參數
參數 | 類型 | 說明 |
---|---|---|
app | 應用程式 | 選用應用程式,指定 MachineLearning 服務。如未提供,系統會傳回預設的 MachineLearning 服務。 |
傳回:
預設的 MachineLearning
服務 (如未提供應用程式),或與所提供應用程式相關聯的 MachineLearning
服務。
範例 1
// Get the MachineLearning service for the default app
const defaultMachineLearning = getMachineLearning();
範例 2
// Get the MachineLearning service for a given app
const otherMachineLearning = getMachineLearning(otherApp);
模型選項
簽名:
export type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions;