pub unsafe trait MLCustomModel {
// Provided methods
unsafe fn initWithModelDescription_parameterDictionary_error(
this: Allocated<Self>,
model_description: &MLModelDescription,
parameters: &NSDictionary<NSString, AnyObject>,
) -> Result<Retained<Self>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn predictionFromFeatures_options_error(
&self,
input: &ProtocolObject<dyn MLFeatureProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn predictionsFromBatch_options_error(
&self,
input_batch: &ProtocolObject<dyn MLBatchProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
where Self: Sized + Message { ... }
}
Available on crate feature
MLCustomModel
only.Expand description
Provided Methods§
unsafe fn initWithModelDescription_parameterDictionary_error( this: Allocated<Self>, model_description: &MLModelDescription, parameters: &NSDictionary<NSString, AnyObject>, ) -> Result<Retained<Self>, Retained<NSError>>
Available on crate feature
MLModelDescription
only.unsafe fn predictionFromFeatures_options_error( &self, input: &ProtocolObject<dyn MLFeatureProvider>, options: &MLPredictionOptions, ) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>
Available on crate features
MLFeatureProvider
and MLPredictionOptions
only.Sourceunsafe fn predictionsFromBatch_options_error(
&self,
input_batch: &ProtocolObject<dyn MLBatchProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
Available on crate features MLBatchProvider
and MLPredictionOptions
only.
unsafe fn predictionsFromBatch_options_error( &self, input_batch: &ProtocolObject<dyn MLBatchProvider>, options: &MLPredictionOptions, ) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
MLBatchProvider
and MLPredictionOptions
only.Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used