objc2_ml_compute/generated/
MLCActivationLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(MLCLayer, NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[cfg(feature = "MLCLayer")]
14 #[deprecated]
15 pub struct MLCActivationLayer;
16);
17
18#[cfg(feature = "MLCLayer")]
19extern_conformance!(
20 unsafe impl NSObjectProtocol for MLCActivationLayer {}
21);
22
23#[cfg(feature = "MLCLayer")]
24impl MLCActivationLayer {
25 extern_methods!(
26 #[cfg(feature = "MLCActivationDescriptor")]
27 #[deprecated]
29 #[unsafe(method(descriptor))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn descriptor(&self) -> Retained<MLCActivationDescriptor>;
32
33 #[cfg(feature = "MLCActivationDescriptor")]
34 #[deprecated]
40 #[unsafe(method(layerWithDescriptor:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn layerWithDescriptor(descriptor: &MLCActivationDescriptor) -> Retained<Self>;
43
44 #[deprecated]
48 #[unsafe(method(reluLayer))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn reluLayer() -> Retained<MLCActivationLayer>;
51
52 #[deprecated]
56 #[unsafe(method(relu6Layer))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn relu6Layer() -> Retained<MLCActivationLayer>;
59
60 #[deprecated]
64 #[unsafe(method(leakyReLULayer))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn leakyReLULayer() -> Retained<MLCActivationLayer>;
67
68 #[deprecated]
74 #[unsafe(method(leakyReLULayerWithNegativeSlope:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn leakyReLULayerWithNegativeSlope(negative_slope: c_float) -> Retained<Self>;
77
78 #[deprecated]
86 #[unsafe(method(linearLayerWithScale:bias:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn linearLayerWithScale_bias(scale: c_float, bias: c_float) -> Retained<Self>;
89
90 #[deprecated]
94 #[unsafe(method(sigmoidLayer))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn sigmoidLayer() -> Retained<MLCActivationLayer>;
97
98 #[deprecated]
102 #[unsafe(method(hardSigmoidLayer))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn hardSigmoidLayer() -> Retained<MLCActivationLayer>;
105
106 #[deprecated]
110 #[unsafe(method(tanhLayer))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn tanhLayer() -> Retained<MLCActivationLayer>;
113
114 #[deprecated]
118 #[unsafe(method(absoluteLayer))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn absoluteLayer() -> Retained<MLCActivationLayer>;
121
122 #[deprecated]
126 #[unsafe(method(softPlusLayer))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn softPlusLayer() -> Retained<MLCActivationLayer>;
129
130 #[deprecated]
136 #[unsafe(method(softPlusLayerWithBeta:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn softPlusLayerWithBeta(beta: c_float) -> Retained<Self>;
139
140 #[deprecated]
144 #[unsafe(method(softSignLayer))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn softSignLayer() -> Retained<MLCActivationLayer>;
147
148 #[deprecated]
152 #[unsafe(method(eluLayer))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn eluLayer() -> Retained<MLCActivationLayer>;
155
156 #[deprecated]
163 #[unsafe(method(eluLayerWithA:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn eluLayerWithA(a: c_float) -> Retained<Self>;
166
167 #[deprecated]
179 #[unsafe(method(relunLayerWithA:b:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn relunLayerWithA_b(a: c_float, b: c_float) -> Retained<Self>;
182
183 #[deprecated]
187 #[unsafe(method(logSigmoidLayer))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn logSigmoidLayer() -> Retained<MLCActivationLayer>;
190
191 #[deprecated]
195 #[unsafe(method(seluLayer))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn seluLayer() -> Retained<MLCActivationLayer>;
198
199 #[deprecated]
203 #[unsafe(method(celuLayer))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn celuLayer() -> Retained<MLCActivationLayer>;
206
207 #[deprecated]
214 #[unsafe(method(celuLayerWithA:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn celuLayerWithA(a: c_float) -> Retained<Self>;
217
218 #[deprecated]
222 #[unsafe(method(hardShrinkLayer))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn hardShrinkLayer() -> Retained<MLCActivationLayer>;
225
226 #[deprecated]
233 #[unsafe(method(hardShrinkLayerWithA:))]
234 #[unsafe(method_family = none)]
235 pub unsafe fn hardShrinkLayerWithA(a: c_float) -> Retained<Self>;
236
237 #[deprecated]
241 #[unsafe(method(softShrinkLayer))]
242 #[unsafe(method_family = none)]
243 pub unsafe fn softShrinkLayer() -> Retained<MLCActivationLayer>;
244
245 #[deprecated]
252 #[unsafe(method(softShrinkLayerWithA:))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn softShrinkLayerWithA(a: c_float) -> Retained<Self>;
255
256 #[deprecated]
260 #[unsafe(method(tanhShrinkLayer))]
261 #[unsafe(method_family = none)]
262 pub unsafe fn tanhShrinkLayer() -> Retained<MLCActivationLayer>;
263
264 #[deprecated]
272 #[unsafe(method(thresholdLayerWithThreshold:replacement:))]
273 #[unsafe(method_family = none)]
274 pub unsafe fn thresholdLayerWithThreshold_replacement(
275 threshold: c_float,
276 replacement: c_float,
277 ) -> Retained<Self>;
278
279 #[deprecated]
283 #[unsafe(method(geluLayer))]
284 #[unsafe(method_family = none)]
285 pub unsafe fn geluLayer() -> Retained<MLCActivationLayer>;
286
287 #[deprecated]
291 #[unsafe(method(hardSwishLayer))]
292 #[unsafe(method_family = none)]
293 pub unsafe fn hardSwishLayer() -> Retained<MLCActivationLayer>;
294
295 #[deprecated]
303 #[unsafe(method(clampLayerWithMinValue:maxValue:))]
304 #[unsafe(method_family = none)]
305 pub unsafe fn clampLayerWithMinValue_maxValue(
306 min_value: c_float,
307 max_value: c_float,
308 ) -> Retained<Self>;
309 );
310}
311
312#[cfg(feature = "MLCLayer")]
314impl MLCActivationLayer {
315 extern_methods!(
316 #[deprecated]
317 #[unsafe(method(new))]
318 #[unsafe(method_family = new)]
319 pub unsafe fn new() -> Retained<Self>;
320
321 #[deprecated]
322 #[unsafe(method(init))]
323 #[unsafe(method_family = init)]
324 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
325 );
326}