blob: caafb772f05cd476963cf0c48b02d127c31ab8ca [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// NOTE: This mojom should be kept in sync with the copy in Chromium OS's repo
// in src/platform2/ml/mojom/.
// Example: A backwards-compatible interface change can be made in Chromium OS
// first, then replicated and used here later.
module chromeos.machine_learning.mojom;
import "chromeos/services/machine_learning/public/mojom/tensor.mojom";
// API for performing inference on a TensorFlow graph. A given graph can be
// executed multiple times with a single instance of GraphExecutor.
interface GraphExecutor {
// Initializes input node values as specified in |inputs|, then executes the
// graph. The returned |outputs| are the values for the nodes specified in
// |output_names|.
Execute(map<string, Tensor> inputs, array<string> output_names)
=> (array<Tensor> outputs);
};