Trait MLCustomModel

Source
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§

Source

unsafe fn initWithModelDescription_parameterDictionary_error( this: Allocated<Self>, model_description: &MLModelDescription, parameters: &NSDictionary<NSString, AnyObject>, ) -> Result<Retained<Self>, Retained<NSError>>
where Self: Sized + Message,

Available on crate feature MLModelDescription only.
Source

unsafe fn predictionFromFeatures_options_error( &self, input: &ProtocolObject<dyn MLFeatureProvider>, options: &MLPredictionOptions, ) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>
where Self: Sized + Message,

Available on crate features MLFeatureProvider and MLPredictionOptions only.
Source

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 features MLBatchProvider and MLPredictionOptions only.

Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used

Trait Implementations§

Source§

impl ProtocolType for dyn MLCustomModel

Source§

const NAME: &'static str = "MLCustomModel"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MLCustomModel
where T: ?Sized + Message + MLCustomModel,

Implementations on Foreign Types§

Source§

impl<T> MLCustomModel for ProtocolObject<T>
where T: ?Sized + MLCustomModel,

Implementors§