objc2_ml_compute/generated/
MLCBatchNormalizationLayer.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 MLCBatchNormalizationLayer;
18);
19
20#[cfg(feature = "MLCLayer")]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for MLCBatchNormalizationLayer {}
23);
24
25#[cfg(feature = "MLCLayer")]
26impl MLCBatchNormalizationLayer {
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 #[deprecated]
37 #[unsafe(method(mean))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn mean(&self) -> Retained<MLCTensor>;
40
41 #[cfg(feature = "MLCTensor")]
42 #[deprecated]
44 #[unsafe(method(variance))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn variance(&self) -> Retained<MLCTensor>;
47
48 #[cfg(feature = "MLCTensor")]
49 #[deprecated]
51 #[unsafe(method(beta))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn beta(&self) -> Option<Retained<MLCTensor>>;
54
55 #[cfg(feature = "MLCTensor")]
56 #[deprecated]
58 #[unsafe(method(gamma))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn gamma(&self) -> Option<Retained<MLCTensor>>;
61
62 #[cfg(feature = "MLCTensorParameter")]
63 #[deprecated]
65 #[unsafe(method(betaParameter))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn betaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
68
69 #[cfg(feature = "MLCTensorParameter")]
70 #[deprecated]
72 #[unsafe(method(gammaParameter))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn gammaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
75
76 #[deprecated]
78 #[unsafe(method(varianceEpsilon))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn varianceEpsilon(&self) -> c_float;
81
82 #[deprecated]
86 #[unsafe(method(momentum))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn momentum(&self) -> c_float;
89
90 #[cfg(feature = "MLCTensor")]
91 #[deprecated]
107 #[unsafe(method(layerWithFeatureChannelCount:mean:variance:beta:gamma:varianceEpsilon:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn layerWithFeatureChannelCount_mean_variance_beta_gamma_varianceEpsilon(
110 feature_channel_count: NSUInteger,
111 mean: &MLCTensor,
112 variance: &MLCTensor,
113 beta: Option<&MLCTensor>,
114 gamma: Option<&MLCTensor>,
115 variance_epsilon: c_float,
116 ) -> Option<Retained<Self>>;
117
118 #[cfg(feature = "MLCTensor")]
119 #[deprecated]
137 #[unsafe(method(layerWithFeatureChannelCount:mean:variance:beta:gamma:varianceEpsilon:momentum:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn layerWithFeatureChannelCount_mean_variance_beta_gamma_varianceEpsilon_momentum(
140 feature_channel_count: NSUInteger,
141 mean: &MLCTensor,
142 variance: &MLCTensor,
143 beta: Option<&MLCTensor>,
144 gamma: Option<&MLCTensor>,
145 variance_epsilon: c_float,
146 momentum: c_float,
147 ) -> Option<Retained<Self>>;
148 );
149}
150
151#[cfg(feature = "MLCLayer")]
153impl MLCBatchNormalizationLayer {
154 extern_methods!(
155 #[deprecated]
156 #[unsafe(method(new))]
157 #[unsafe(method_family = new)]
158 pub unsafe fn new() -> Retained<Self>;
159
160 #[deprecated]
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164 );
165}