Firebase 机器学习。
函数
函数 | 说明 |
---|---|
getMachineLearning(应用) | 获取默认应用或指定应用的机器学习服务。可调用getMachineLearning() 不使用任何参数,以访问默认应用的MachineLearning 服务,或以getMachineLearning(app) 与特定应用服务相关联的MachineLearning |
类
类 | 说明 |
---|---|
机器学习 | Firebase MachineLearning 服务接口。 |
模型 | Firebase ML 模型输出对象。 |
接口
接口 | 说明 |
---|---|
GcsTfliteModelOptions | |
ListModelsOptions | 表示用于列出模型的选项的接口。 |
ListModelsResult | listModels 操作的响应对象。 |
ModelOptionsBase | Firebase ML 模型输入对象 |
TFLiteModel | TensorFlow Lite 模型输出对象 |
类型别名
类型别名 | 说明 |
---|---|
ModelOptions |
getMachineLearning(应用)
获取默认应用或指定应用的机器学习服务。
可以不使用任何参数调用 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);
ModelOptions
签名:
export type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions;