Package apple.coreml.protocol
Interface MLCustomModel
-
public interface MLCustomModelProtocol for specifying a custom model implementation. API-Since: 12.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Nullable MLCustomModelinitWithModelDescriptionParameterDictionaryError(@NotNull MLModelDescription modelDescription, @NotNull NSDictionary<java.lang.String,?> parameters, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)Initialize the custom model implementation.@Nullable MLFeatureProviderpredictionFromFeaturesOptionsError(@NotNull MLFeatureProvider input, @NotNull MLPredictionOptions options, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)Required implemenationat of a single sample input prediction.default @Nullable MLBatchProviderpredictionsFromBatchOptionsError(@NotNull MLBatchProvider inputBatch, @NotNull MLPredictionOptions options, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used
-
-
-
Method Detail
-
initWithModelDescriptionParameterDictionaryError
@Nullable @Nullable MLCustomModel initWithModelDescriptionParameterDictionaryError(@NotNull @NotNull MLModelDescription modelDescription, @NotNull @NotNull NSDictionary<java.lang.String,?> parameters, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
Initialize the custom model implementation. The model description describes the input and output feature types and metadata in the Model specificaiton. The parameter dictionary contains the contents of the 'parameters' map from the CustomModel specification. This function is called once on model load. We expect the implementation to return 'nil' and set an error in the event of failure initializing the object.
-
predictionFromFeaturesOptionsError
@Nullable @Nullable MLFeatureProvider predictionFromFeaturesOptionsError(@NotNull @NotNull MLFeatureProvider input, @NotNull @NotNull MLPredictionOptions options, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
Required implemenationat of a single sample input prediction.
-
predictionsFromBatchOptionsError
@Nullable default @Nullable MLBatchProvider predictionsFromBatchOptionsError(@NotNull @NotNull MLBatchProvider inputBatch, @NotNull @NotNull MLPredictionOptions options, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used
-
-