objc2_ml_compute/generated/
MLCInstanceNormalizationLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(MLCLayer, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "MLCLayer")]
16 #[deprecated]
17 pub struct MLCInstanceNormalizationLayer;
18);
19
20#[cfg(feature = "MLCLayer")]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for MLCInstanceNormalizationLayer {}
23);
24
25#[cfg(feature = "MLCLayer")]
26impl MLCInstanceNormalizationLayer {
27 extern_methods!(
28 #[deprecated]
30 #[unsafe(method(featureChannelCount))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn featureChannelCount(&self) -> NSUInteger;
33
34 #[cfg(feature = "MLCTensor")]
35 #[unsafe(method(mean))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn mean(&self) -> Option<Retained<MLCTensor>>;
39
40 #[cfg(feature = "MLCTensor")]
41 #[unsafe(method(variance))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn variance(&self) -> Option<Retained<MLCTensor>>;
45
46 #[cfg(feature = "MLCTensor")]
47 #[deprecated]
49 #[unsafe(method(beta))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn beta(&self) -> Option<Retained<MLCTensor>>;
52
53 #[cfg(feature = "MLCTensor")]
54 #[deprecated]
56 #[unsafe(method(gamma))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn gamma(&self) -> Option<Retained<MLCTensor>>;
59
60 #[cfg(feature = "MLCTensorParameter")]
61 #[deprecated]
63 #[unsafe(method(betaParameter))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn betaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
66
67 #[cfg(feature = "MLCTensorParameter")]
68 #[deprecated]
70 #[unsafe(method(gammaParameter))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn gammaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
73
74 #[deprecated]
76 #[unsafe(method(varianceEpsilon))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn varianceEpsilon(&self) -> c_float;
79
80 #[deprecated]
84 #[unsafe(method(momentum))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn momentum(&self) -> c_float;
87
88 #[cfg(feature = "MLCTensor")]
89 #[deprecated]
101 #[unsafe(method(layerWithFeatureChannelCount:beta:gamma:varianceEpsilon:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn layerWithFeatureChannelCount_beta_gamma_varianceEpsilon(
104 feature_channel_count: NSUInteger,
105 beta: Option<&MLCTensor>,
106 gamma: Option<&MLCTensor>,
107 variance_epsilon: c_float,
108 ) -> Option<Retained<Self>>;
109
110 #[cfg(feature = "MLCTensor")]
111 #[deprecated]
125 #[unsafe(method(layerWithFeatureChannelCount:beta:gamma:varianceEpsilon:momentum:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn layerWithFeatureChannelCount_beta_gamma_varianceEpsilon_momentum(
128 feature_channel_count: NSUInteger,
129 beta: Option<&MLCTensor>,
130 gamma: Option<&MLCTensor>,
131 variance_epsilon: c_float,
132 momentum: c_float,
133 ) -> Option<Retained<Self>>;
134
135 #[cfg(feature = "MLCTensor")]
136 #[unsafe(method(layerWithFeatureChannelCount:mean:variance:beta:gamma:varianceEpsilon:momentum:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn layerWithFeatureChannelCount_mean_variance_beta_gamma_varianceEpsilon_momentum(
156 feature_channel_count: NSUInteger,
157 mean: &MLCTensor,
158 variance: &MLCTensor,
159 beta: Option<&MLCTensor>,
160 gamma: Option<&MLCTensor>,
161 variance_epsilon: c_float,
162 momentum: c_float,
163 ) -> Option<Retained<Self>>;
164 );
165}
166
167#[cfg(feature = "MLCLayer")]
169impl MLCInstanceNormalizationLayer {
170 extern_methods!(
171 #[deprecated]
172 #[unsafe(method(new))]
173 #[unsafe(method_family = new)]
174 pub unsafe fn new() -> Retained<Self>;
175
176 #[deprecated]
177 #[unsafe(method(init))]
178 #[unsafe(method_family = init)]
179 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
180 );
181}