pub struct MPSCNNDepthWiseConvolutionDescriptor { /* private fields */ }MPSCNNConvolution only.Expand description
MPSCNNDepthWiseConvolutionDescriptor can be used to create MPSCNNConvolution object that does depthwise convolution
Depthwise convolution applies different filter to each input feature channel i.e. no cross channel mixing. Number of outputFeatureChannels can be greater than number of inputFeatureChannels, in which case convolution expects channelMultipler = outputFeactureChannels/inputFeatureChannels number of filters for each input channel. This means channelMultipler filters are applied to each input feature channel producing channelMultipler output feature channels. All channelMultipler output feature channels produced by single input feature channel are stored togather in output image i.e. output[x,y,k*channelMultiplier + q] = input[x,y,k] * filter[k,q] where * here denotes convolution. group must be 1. Weights array returned by MPSCNNConvolutionDataProvier is interpreted as Weights [inputFeatureChannels] [channelMultiplier] [kH] [kW] = Weights [ inputFeatureChannels * channelMultiplier ] [kH] [kW] = Weights [ outputFeatureChannels ] [kH] [kW]
Currently only channel multipler of 1 is supported i.e. inputFeatureChannels == outputFeatureChannels
See also Apple’s documentation
Implementations§
Source§impl MPSCNNDepthWiseConvolutionDescriptor
impl MPSCNNDepthWiseConvolutionDescriptor
Sourcepub unsafe fn channelMultiplier(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn channelMultiplier(&self) -> NSUInteger
MPSNeuralNetwork only.Ratio of outputFeactureChannel to inputFeatureChannels for depthwise convolution i.e. how many output feature channels are produced by each input channel.
Source§impl MPSCNNDepthWiseConvolutionDescriptor
Methods declared on superclass MPSCNNConvolutionDescriptor.
impl MPSCNNDepthWiseConvolutionDescriptor
Methods declared on superclass MPSCNNConvolutionDescriptor.
Sourcepub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<Retained<Self>>
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn initWithCoder( this: Allocated<Self>, a_decoder: &NSCoder, ) -> Option<Retained<Self>>
MPSNeuralNetwork only.Sourcepub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_neuronFilter(
kernel_width: NSUInteger,
kernel_height: NSUInteger,
input_feature_channels: NSUInteger,
output_feature_channels: NSUInteger,
neuron_filter: Option<&MPSCNNNeuron>,
) -> Retained<Self>
👎DeprecatedAvailable on crate features MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels_neuronFilter( kernel_width: NSUInteger, kernel_height: NSUInteger, input_feature_channels: NSUInteger, output_feature_channels: NSUInteger, neuron_filter: Option<&MPSCNNNeuron>, ) -> Retained<Self>
MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.This method is deprecated. Please use neuronType, neuronParameterA and neuronParameterB properites to fuse neuron with convolution.
Parameter kernelWidth: The width of the filter window. Must be > 0. Large values will take a long time.
Parameter kernelHeight: The height of the filter window. Must be > 0. Large values will take a long time.
Parameter inputFeatureChannels: The number of feature channels in the input image. Must be >= 1.
Parameter outputFeatureChannels: The number of feature channels in the output image. Must be >= 1.
Parameter neuronFilter: An optional neuron filter that can be applied to the output of convolution.
Returns: A valid MPSCNNConvolutionDescriptor object or nil, if failure.
Sourcepub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels(
kernel_width: NSUInteger,
kernel_height: NSUInteger,
input_feature_channels: NSUInteger,
output_feature_channels: NSUInteger,
) -> Retained<Self>
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn cnnConvolutionDescriptorWithKernelWidth_kernelHeight_inputFeatureChannels_outputFeatureChannels( kernel_width: NSUInteger, kernel_height: NSUInteger, input_feature_channels: NSUInteger, output_feature_channels: NSUInteger, ) -> Retained<Self>
MPSNeuralNetwork only.Creates a convolution descriptor.
Parameter kernelWidth: The width of the filter window. Must be > 0. Large values will take a long time.
Parameter kernelHeight: The height of the filter window. Must be > 0. Large values will take a long time.
Parameter inputFeatureChannels: The number of feature channels in the input image. Must be >= 1.
Parameter outputFeatureChannels: The number of feature channels in the output image. Must be >= 1.
Returns: A valid MPSCNNConvolutionDescriptor object or nil, if failure.
Methods from Deref<Target = MPSCNNConvolutionDescriptor>§
Sourcepub unsafe fn kernelWidth(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn kernelWidth(&self) -> NSUInteger
MPSNeuralNetwork only.The width of the filter window. The default value is 3. Any positive non-zero value is valid, including even values. The position of the left edge of the filter window is given by offset.x - (kernelWidth>>1)
Sourcepub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger)
MPSNeuralNetwork only.Setter for kernelWidth.
Sourcepub unsafe fn kernelHeight(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn kernelHeight(&self) -> NSUInteger
MPSNeuralNetwork only.The height of the filter window. The default value is 3. Any positive non-zero value is valid, including even values. The position of the top edge of the filter window is given by offset.y - (kernelHeight>>1)
Sourcepub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger)
MPSNeuralNetwork only.Setter for kernelHeight.
Sourcepub unsafe fn inputFeatureChannels(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn inputFeatureChannels(&self) -> NSUInteger
MPSNeuralNetwork only.The number of feature channels per pixel in the input image.
Sourcepub unsafe fn setInputFeatureChannels(&self, input_feature_channels: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setInputFeatureChannels(&self, input_feature_channels: NSUInteger)
MPSNeuralNetwork only.Setter for inputFeatureChannels.
Sourcepub unsafe fn outputFeatureChannels(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn outputFeatureChannels(&self) -> NSUInteger
MPSNeuralNetwork only.The number of feature channels per pixel in the output image.
Sourcepub unsafe fn setOutputFeatureChannels(
&self,
output_feature_channels: NSUInteger,
)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setOutputFeatureChannels( &self, output_feature_channels: NSUInteger, )
MPSNeuralNetwork only.Setter for outputFeatureChannels.
Sourcepub unsafe fn strideInPixelsX(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn strideInPixelsX(&self) -> NSUInteger
MPSNeuralNetwork only.The output stride (downsampling factor) in the x dimension. The default value is 1.
Sourcepub unsafe fn setStrideInPixelsX(&self, stride_in_pixels_x: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setStrideInPixelsX(&self, stride_in_pixels_x: NSUInteger)
MPSNeuralNetwork only.Setter for strideInPixelsX.
Sourcepub unsafe fn strideInPixelsY(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn strideInPixelsY(&self) -> NSUInteger
MPSNeuralNetwork only.The output stride (downsampling factor) in the y dimension. The default value is 1.
Sourcepub unsafe fn setStrideInPixelsY(&self, stride_in_pixels_y: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setStrideInPixelsY(&self, stride_in_pixels_y: NSUInteger)
MPSNeuralNetwork only.Setter for strideInPixelsY.
Sourcepub unsafe fn groups(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn groups(&self) -> NSUInteger
MPSNeuralNetwork only.Number of groups input and output channels are divided into. The default value is 1. Groups lets you reduce the parameterization. If groups is set to n, input is divided into n groups with inputFeatureChannels/n channels in each group. Similarly output is divided into n groups with outputFeatureChannels/n channels in each group. ith group in input is only connected to ith group in output so number of weights (parameters) needed is reduced by factor of n. Both inputFeatureChannels and outputFeatureChannels must be divisible by n and number of channels in each group must be multiple of 4.
Sourcepub unsafe fn setGroups(&self, groups: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setGroups(&self, groups: NSUInteger)
MPSNeuralNetwork only.Setter for groups.
Sourcepub unsafe fn dilationRateX(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn dilationRateX(&self) -> NSUInteger
MPSNeuralNetwork only.dilationRateX property can be used to implement dilated convolution as described in https://arxiv.org/pdf/1511.07122v3.pdf to aggregate global information in dense prediction problems. Default value is 1. When set to value > 1, original kernel width, kW is dilated to
kW_Dilated = (kW-1)*dilationRateX + 1
by inserting d-1 zeros between consecutive entries in each row of the original kernel. The kernel is centered based on kW_Dilated.
Sourcepub unsafe fn setDilationRateX(&self, dilation_rate_x: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setDilationRateX(&self, dilation_rate_x: NSUInteger)
MPSNeuralNetwork only.Setter for dilationRateX.
Sourcepub unsafe fn dilationRateY(&self) -> NSUInteger
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn dilationRateY(&self) -> NSUInteger
MPSNeuralNetwork only.dilationRateY property can be used to implement dilated convolution as described in https://arxiv.org/pdf/1511.07122v3.pdf to aggregate global information in dense prediction problems. Default value is 1. When set to value > 1, original kernel height, kH is dilated to
kH_Dilated = (kH-1)*dilationRateY + 1
by inserting d-1 rows of zeros between consecutive row of the original kernel. The kernel is centered based on kH_Dilated.
Sourcepub unsafe fn setDilationRateY(&self, dilation_rate_y: NSUInteger)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setDilationRateY(&self, dilation_rate_y: NSUInteger)
MPSNeuralNetwork only.Setter for dilationRateY.
Sourcepub unsafe fn fusedNeuronDescriptor(&self) -> Retained<MPSNNNeuronDescriptor>
Available on crate features MPSNeuralNetwork and MPSCNNNeuron only.
pub unsafe fn fusedNeuronDescriptor(&self) -> Retained<MPSNNNeuronDescriptor>
MPSNeuralNetwork and MPSCNNNeuron only.This mathod can be used to add a neuron activation funtion of given type with associated scalar parameters A and B that are shared across all output channels. Neuron activation fucntion is applied to output of convolution. This is a per-pixel operation that is fused with convolution kernel itself for best performance. Note that this method can only be used to fuse neuron of kind for which parameters A and B are shared across all channels of convoution output. It is an error to call this method for neuron activation functions like MPSCNNNeuronTypePReLU, which require per-channel parameter values. For those kind of neuron activation functions, use appropriate setter functions. Default is descriptor with neuronType MPSCNNNeuronTypeNone.
Note: in certain cases the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Sourcepub unsafe fn setFusedNeuronDescriptor(
&self,
fused_neuron_descriptor: &MPSNNNeuronDescriptor,
)
Available on crate features MPSNeuralNetwork and MPSCNNNeuron only.
pub unsafe fn setFusedNeuronDescriptor( &self, fused_neuron_descriptor: &MPSNNNeuronDescriptor, )
MPSNeuralNetwork and MPSCNNNeuron only.Setter for fusedNeuronDescriptor.
Sourcepub unsafe fn neuron(&self) -> Option<Retained<MPSCNNNeuron>>
👎DeprecatedAvailable on crate features MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn neuron(&self) -> Option<Retained<MPSCNNNeuron>>
MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.MPSCNNNeuron filter to be applied as part of convolution. This is applied after BatchNormalization in the end. Default is nil. This is deprecated. You dont need to create MPSCNNNeuron object to fuse with convolution. Use neuron properties in this descriptor.
Sourcepub unsafe fn setNeuron(&self, neuron: Option<&MPSCNNNeuron>)
👎DeprecatedAvailable on crate features MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.
pub unsafe fn setNeuron(&self, neuron: Option<&MPSCNNNeuron>)
MPSNeuralNetwork and MPSCNNKernel and MPSCNNNeuron and MPSCore and MPSKernel only.Setter for neuron.
Sourcepub unsafe fn encodeWithCoder(&self, a_coder: &NSCoder)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn encodeWithCoder(&self, a_coder: &NSCoder)
MPSNeuralNetwork only.Sourcepub unsafe fn setBatchNormalizationParametersForInferenceWithMean_variance_gamma_beta_epsilon(
&self,
mean: *const c_float,
variance: *const c_float,
gamma: *const c_float,
beta: *const c_float,
epsilon: c_float,
)
Available on crate feature MPSNeuralNetwork only.
pub unsafe fn setBatchNormalizationParametersForInferenceWithMean_variance_gamma_beta_epsilon( &self, mean: *const c_float, variance: *const c_float, gamma: *const c_float, beta: *const c_float, epsilon: c_float, )
MPSNeuralNetwork only.Adds batch normalization for inference, it copies all the float arrays provided, expecting outputFeatureChannels elements in each.
This method will be used to pass in batch normalization parameters to the convolution during the init call. For inference we modify weights and bias going in convolution or Fully Connected layer to combine and optimize the layers.
w: weights for a corresponding output feature channel b: bias for a corresponding output feature channel W: batch normalized weights for a corresponding output feature channel B: batch normalized bias for a corresponding output feature channel
I = gamma / sqrt(variance + epsilon), J = beta - ( I * mean )
W = w * I B = b * I + J
Every convolution has (OutputFeatureChannel * kernelWidth * kernelHeight * InputFeatureChannel) weights
I, J are calculated, for every output feature channel separately to get the corresponding weights and bias Thus, I, J are calculated and then used for every (kernelWidth * kernelHeight * InputFeatureChannel) weights, and this is done OutputFeatureChannel number of times for each output channel.
thus, internally, batch normalized weights are computed as:
W[no][i][j][ni] = w[no][i][j][ni] * I[no]
no: index into outputFeatureChannel i : index into kernel Height j : index into kernel Width ni: index into inputFeatureChannel
One usually doesn’t see a bias term and batch normalization together as batch normalization potentially cancels out the bias term after training, but in MPS if the user provides it, batch normalization will use the above formula to incorporate it, if user does not have bias terms then put a float array of zeroes in the convolution init for bias terms of each output feature channel.
this comes from: https://arxiv.org/pdf/1502.03167v3.pdf
Note: in certain cases the batch normalization parameters will be cached by the MPSNNGraph or the MPSCNNConvolution. If the batch normalization parameters change after either is made, behavior is undefined.
Parameter mean: Pointer to an array of floats of mean for each output feature channel
Parameter variance: Pointer to an array of floats of variance for each output feature channel
Parameter gamma: Pointer to an array of floats of gamma for each output feature channel
Parameter beta: Pointer to an array of floats of beta for each output feature channel
Parameter epsilon: A small float value used to have numerical stability in the code
§Safety
meanmust be a valid pointer or null.variancemust be a valid pointer or null.gammamust be a valid pointer or null.betamust be a valid pointer or null.
Sourcepub unsafe fn setNeuronType_parameterA_parameterB(
&self,
neuron_type: MPSCNNNeuronType,
parameter_a: c_float,
parameter_b: c_float,
)
👎DeprecatedAvailable on crate features MPSNeuralNetwork and MPSCNNNeuronType only.
pub unsafe fn setNeuronType_parameterA_parameterB( &self, neuron_type: MPSCNNNeuronType, parameter_a: c_float, parameter_b: c_float, )
MPSNeuralNetwork and MPSCNNNeuronType only.Adds a neuron activation function to convolution descriptor.
This mathod can be used to add a neuron activation funtion of given type with associated scalar parameters A and B that are shared across all output channels. Neuron activation fucntion is applied to output of convolution. This is a per-pixel operation that is fused with convolution kernel itself for best performance. Note that this method can only be used to fuse neuron of kind for which parameters A and B are shared across all channels of convoution output. It is an error to call this method for neuron activation functions like MPSCNNNeuronTypePReLU, which require per-channel parameter values. For those kind of neuron activation functions, use appropriate setter functions.
Note: in certain cases, the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Parameter neuronType: type of neuron activation function. For full list see MPSCNNNeuronType.h
Parameter parameterA: parameterA of neuron activation that is shared across all channels of convolution output.
Parameter parameterB: parameterB of neuron activation that is shared across all channels of convolution output.
Sourcepub unsafe fn neuronType(&self) -> MPSCNNNeuronType
👎DeprecatedAvailable on crate features MPSNeuralNetwork and MPSCNNNeuronType only.
pub unsafe fn neuronType(&self) -> MPSCNNNeuronType
MPSNeuralNetwork and MPSCNNNeuronType only.Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn neuronParameterA(&self) -> c_float
👎DeprecatedAvailable on crate feature MPSNeuralNetwork only.
pub unsafe fn neuronParameterA(&self) -> c_float
MPSNeuralNetwork only.Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn neuronParameterB(&self) -> c_float
👎DeprecatedAvailable on crate feature MPSNeuralNetwork only.
pub unsafe fn neuronParameterB(&self) -> c_float
MPSNeuralNetwork only.Getter funtion for neuronType set using setNeuronType:parameterA:parameterB method
Sourcepub unsafe fn setNeuronToPReLUWithParametersA(&self, a: &NSData)
👎DeprecatedAvailable on crate feature MPSNeuralNetwork only.
pub unsafe fn setNeuronToPReLUWithParametersA(&self, a: &NSData)
MPSNeuralNetwork only.Add per-channel neuron parameters A for PReLu neuron activation functions.
This method sets the neuron to PReLU, zeros parameters A and B and sets the per-channel neuron parameters A to an array containing a unique value of A for each output feature channel.
If the neuron function is f(v,a,b), it will apply
OutputImage(x,y,i) = f( ConvolutionResult(x,y,i), A[i], B[i] ) where i in [0,outputFeatureChannels-1]
See https://arxiv.org/pdf/1502.01852.pdf for details.
All other neuron types, where parameter A and parameter B are shared across channels must be set using -setNeuronOfType:parameterA:parameterB:
If batch normalization parameters are set, batch normalization will occur before neuron application i.e. output of convolution is first batch normalized followed by neuron activation. This function automatically sets neuronType to MPSCNNNeuronTypePReLU.
Note: in certain cases the neuron descriptor will be cached by the MPSNNGraph or the MPSCNNConvolution. If the neuron type changes after either is made, behavior is undefined.
Parameter A: An array containing per-channel float values for neuron parameter A.
Number of entries must be equal to outputFeatureChannels.
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Panics
May panic if the object is invalid (which may be the case for objects
returned from unavailable init/new methods).
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
Attempt to downcast the object to a class of type T.
This is the reference-variant. Use Retained::downcast if you want
to convert a retained object to another type.
§Mutable classes
Some classes have immutable and mutable variants, such as NSString
and NSMutableString.
When some Objective-C API signature says it gives you an immutable class, it generally expects you to not mutate that, even though it may technically be mutable “under the hood”.
So using this method to convert a NSString to a NSMutableString,
while not unsound, is generally frowned upon unless you created the
string yourself, or the API explicitly documents the string to be
mutable.
See Apple’s documentation on mutability and on
isKindOfClass: for more details.
§Generic classes
Objective-C generics are called “lightweight generics”, and that’s because they aren’t exposed in the runtime. This makes it impossible to safely downcast to generic collections, so this is disallowed by this method.
You can, however, safely downcast to generic collections where all the
type-parameters are AnyObject.
§Panics
This works internally by calling isKindOfClass:. That means that the
object must have the instance method of that name, and an exception
will be thrown (if CoreFoundation is linked) or the process will abort
if that is not the case. In the vast majority of cases, you don’t need
to worry about this, since both root objects NSObject and
NSProxy implement this method.
§Examples
Cast an NSString back and forth from NSObject.
use objc2::rc::Retained;
use objc2_foundation::{NSObject, NSString};
let obj: Retained<NSObject> = NSString::new().into_super();
let string = obj.downcast_ref::<NSString>().unwrap();
// Or with `downcast`, if we do not need the object afterwards
let string = obj.downcast::<NSString>().unwrap();Try (and fail) to cast an NSObject to an NSString.
use objc2_foundation::{NSObject, NSString};
let obj = NSObject::new();
assert!(obj.downcast_ref::<NSString>().is_none());Try to cast to an array of strings.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
// This is invalid and doesn't type check.
let arr = arr.downcast_ref::<NSArray<NSString>>();This fails to compile, since it would require enumerating over the array to ensure that each element is of the desired type, which is a performance pitfall.
Downcast when processing each element instead.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
for elem in arr {
if let Some(data) = elem.downcast_ref::<NSString>() {
// handle `data`
}
}Trait Implementations§
Source§impl AsRef<AnyObject> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl AsRef<AnyObject> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl AsRef<MPSCNNConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl AsRef<MPSCNNConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§fn as_ref(&self) -> &MPSCNNConvolutionDescriptor
fn as_ref(&self) -> &MPSCNNConvolutionDescriptor
Source§impl AsRef<MPSCNNDepthWiseConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl AsRef<MPSCNNDepthWiseConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl AsRef<NSObject> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl AsRef<NSObject> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl Borrow<AnyObject> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Borrow<AnyObject> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl Borrow<MPSCNNConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Borrow<MPSCNNConvolutionDescriptor> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§fn borrow(&self) -> &MPSCNNConvolutionDescriptor
fn borrow(&self) -> &MPSCNNConvolutionDescriptor
Source§impl Borrow<NSObject> for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Borrow<NSObject> for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl ClassType for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl ClassType for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§const NAME: &'static str = "MPSCNNDepthWiseConvolutionDescriptor"
const NAME: &'static str = "MPSCNNDepthWiseConvolutionDescriptor"
Source§type Super = MPSCNNConvolutionDescriptor
type Super = MPSCNNConvolutionDescriptor
Source§type ThreadKind = <<MPSCNNDepthWiseConvolutionDescriptor as ClassType>::Super as ClassType>::ThreadKind
type ThreadKind = <<MPSCNNDepthWiseConvolutionDescriptor as ClassType>::Super as ClassType>::ThreadKind
Source§impl CopyingHelper for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl CopyingHelper for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§type Result = MPSCNNDepthWiseConvolutionDescriptor
type Result = MPSCNNDepthWiseConvolutionDescriptor
Self if the type has no
immutable counterpart. Read moreSource§impl Debug for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Debug for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl Deref for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Deref for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl Hash for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Hash for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl Message for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl Message for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl NSCoding for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl NSCoding for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl NSCopying for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl NSCopying for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl NSObjectProtocol for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl NSObjectProtocol for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§fn isEqual(&self, other: Option<&AnyObject>) -> bool
fn isEqual(&self, other: Option<&AnyObject>) -> bool
Source§fn hash(&self) -> usize
fn hash(&self) -> usize
Source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
isKindOfClass directly, or cast your objects with AnyObject::downcast_refSource§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
Source§impl NSSecureCoding for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl NSSecureCoding for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl PartialEq for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl PartialEq for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§impl RefEncode for MPSCNNDepthWiseConvolutionDescriptor
Available on crate feature MPSNeuralNetwork only.
impl RefEncode for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.Source§const ENCODING_REF: Encoding = <MPSCNNConvolutionDescriptor as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <MPSCNNConvolutionDescriptor as ::objc2::RefEncode>::ENCODING_REF
impl DowncastTarget for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.impl Eq for MPSCNNDepthWiseConvolutionDescriptor
MPSNeuralNetwork only.