WebIDLpedia

MLContext interface

Definition

Web Neural Network API defines MLContext



[SecureContext, Exposed=(Window, DedicatedWorker)]
interface MLContext {
  undefined dispatch(MLGraph graph, MLNamedTensors inputs, MLNamedTensors outputs);

  Promise<MLTensor> createTensor(MLTensorDescriptor descriptor);

  Promise<ArrayBuffer> readTensor(MLTensor tensor);
  Promise<undefined> readTensor(MLTensor tensor, AllowSharedBufferSource outputData);

  undefined writeTensor(MLTensor tensor, AllowSharedBufferSource inputData);

  MLOpSupportLimits opSupportLimits();
};

Methods and attributes that return objects implementing MLContext

Referring IDL interfaces/dictionaries