objc2_ml_compute/generated/
MLCYOLOLossLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(MLCLossLayer, MLCLayer, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "MLCLayer", feature = "MLCLossLayer"))]
16 #[deprecated]
17 pub struct MLCYOLOLossLayer;
18);
19
20#[cfg(all(feature = "MLCLayer", feature = "MLCLossLayer"))]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for MLCYOLOLossLayer {}
23);
24
25#[cfg(all(feature = "MLCLayer", feature = "MLCLossLayer"))]
26impl MLCYOLOLossLayer {
27 extern_methods!(
28 #[cfg(feature = "MLCYOLOLossDescriptor")]
29 #[deprecated]
31 #[unsafe(method(yoloLossDescriptor))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn yoloLossDescriptor(&self) -> Retained<MLCYOLOLossDescriptor>;
34
35 #[cfg(feature = "MLCYOLOLossDescriptor")]
36 #[deprecated]
42 #[unsafe(method(layerWithDescriptor:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn layerWithDescriptor(
45 loss_descriptor: &MLCYOLOLossDescriptor,
46 ) -> Retained<Self>;
47 );
48}
49
50#[cfg(all(feature = "MLCLayer", feature = "MLCLossLayer"))]
52impl MLCYOLOLossLayer {
53 extern_methods!(
54 #[cfg(all(feature = "MLCLossDescriptor", feature = "MLCTensor"))]
55 #[deprecated]
63 #[unsafe(method(layerWithDescriptor:weights:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn layerWithDescriptor_weights(
66 loss_descriptor: &MLCLossDescriptor,
67 weights: &MLCTensor,
68 ) -> Retained<Self>;
69
70 #[cfg(feature = "MLCTypes")]
71 #[deprecated]
83 #[unsafe(method(softmaxCrossEntropyLossWithReductionType:labelSmoothing:classCount:weight:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn softmaxCrossEntropyLossWithReductionType_labelSmoothing_classCount_weight(
86 reduction_type: MLCReductionType,
87 label_smoothing: c_float,
88 class_count: NSUInteger,
89 weight: c_float,
90 ) -> Retained<Self>;
91
92 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
93 #[deprecated]
105 #[unsafe(method(softmaxCrossEntropyLossWithReductionType:labelSmoothing:classCount:weights:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn softmaxCrossEntropyLossWithReductionType_labelSmoothing_classCount_weights(
108 reduction_type: MLCReductionType,
109 label_smoothing: c_float,
110 class_count: NSUInteger,
111 weights: Option<&MLCTensor>,
112 ) -> Retained<Self>;
113
114 #[cfg(feature = "MLCTypes")]
115 #[deprecated]
127 #[unsafe(method(categoricalCrossEntropyLossWithReductionType:labelSmoothing:classCount:weight:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn categoricalCrossEntropyLossWithReductionType_labelSmoothing_classCount_weight(
130 reduction_type: MLCReductionType,
131 label_smoothing: c_float,
132 class_count: NSUInteger,
133 weight: c_float,
134 ) -> Retained<Self>;
135
136 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
137 #[deprecated]
149 #[unsafe(method(categoricalCrossEntropyLossWithReductionType:labelSmoothing:classCount:weights:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn categoricalCrossEntropyLossWithReductionType_labelSmoothing_classCount_weights(
152 reduction_type: MLCReductionType,
153 label_smoothing: c_float,
154 class_count: NSUInteger,
155 weights: Option<&MLCTensor>,
156 ) -> Retained<Self>;
157
158 #[cfg(feature = "MLCTypes")]
159 #[deprecated]
169 #[unsafe(method(sigmoidCrossEntropyLossWithReductionType:labelSmoothing:weight:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn sigmoidCrossEntropyLossWithReductionType_labelSmoothing_weight(
172 reduction_type: MLCReductionType,
173 label_smoothing: c_float,
174 weight: c_float,
175 ) -> Retained<Self>;
176
177 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
178 #[deprecated]
188 #[unsafe(method(sigmoidCrossEntropyLossWithReductionType:labelSmoothing:weights:))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn sigmoidCrossEntropyLossWithReductionType_labelSmoothing_weights(
191 reduction_type: MLCReductionType,
192 label_smoothing: c_float,
193 weights: Option<&MLCTensor>,
194 ) -> Retained<Self>;
195
196 #[cfg(feature = "MLCTypes")]
197 #[deprecated]
207 #[unsafe(method(logLossWithReductionType:epsilon:weight:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn logLossWithReductionType_epsilon_weight(
210 reduction_type: MLCReductionType,
211 epsilon: c_float,
212 weight: c_float,
213 ) -> Retained<Self>;
214
215 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
216 #[deprecated]
226 #[unsafe(method(logLossWithReductionType:epsilon:weights:))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn logLossWithReductionType_epsilon_weights(
229 reduction_type: MLCReductionType,
230 epsilon: c_float,
231 weights: Option<&MLCTensor>,
232 ) -> Retained<Self>;
233
234 #[cfg(feature = "MLCTypes")]
235 #[deprecated]
245 #[unsafe(method(huberLossWithReductionType:delta:weight:))]
246 #[unsafe(method_family = none)]
247 pub unsafe fn huberLossWithReductionType_delta_weight(
248 reduction_type: MLCReductionType,
249 delta: c_float,
250 weight: c_float,
251 ) -> Retained<Self>;
252
253 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
254 #[deprecated]
264 #[unsafe(method(huberLossWithReductionType:delta:weights:))]
265 #[unsafe(method_family = none)]
266 pub unsafe fn huberLossWithReductionType_delta_weights(
267 reduction_type: MLCReductionType,
268 delta: c_float,
269 weights: Option<&MLCTensor>,
270 ) -> Retained<Self>;
271
272 #[cfg(feature = "MLCTypes")]
273 #[deprecated]
281 #[unsafe(method(meanAbsoluteErrorLossWithReductionType:weight:))]
282 #[unsafe(method_family = none)]
283 pub unsafe fn meanAbsoluteErrorLossWithReductionType_weight(
284 reduction_type: MLCReductionType,
285 weight: c_float,
286 ) -> Retained<Self>;
287
288 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
289 #[deprecated]
297 #[unsafe(method(meanAbsoluteErrorLossWithReductionType:weights:))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn meanAbsoluteErrorLossWithReductionType_weights(
300 reduction_type: MLCReductionType,
301 weights: Option<&MLCTensor>,
302 ) -> Retained<Self>;
303
304 #[cfg(feature = "MLCTypes")]
305 #[deprecated]
313 #[unsafe(method(meanSquaredErrorLossWithReductionType:weight:))]
314 #[unsafe(method_family = none)]
315 pub unsafe fn meanSquaredErrorLossWithReductionType_weight(
316 reduction_type: MLCReductionType,
317 weight: c_float,
318 ) -> Retained<Self>;
319
320 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
321 #[deprecated]
329 #[unsafe(method(meanSquaredErrorLossWithReductionType:weights:))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn meanSquaredErrorLossWithReductionType_weights(
332 reduction_type: MLCReductionType,
333 weights: Option<&MLCTensor>,
334 ) -> Retained<Self>;
335
336 #[cfg(feature = "MLCTypes")]
337 #[deprecated]
345 #[unsafe(method(hingeLossWithReductionType:weight:))]
346 #[unsafe(method_family = none)]
347 pub unsafe fn hingeLossWithReductionType_weight(
348 reduction_type: MLCReductionType,
349 weight: c_float,
350 ) -> Retained<Self>;
351
352 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
353 #[deprecated]
361 #[unsafe(method(hingeLossWithReductionType:weights:))]
362 #[unsafe(method_family = none)]
363 pub unsafe fn hingeLossWithReductionType_weights(
364 reduction_type: MLCReductionType,
365 weights: Option<&MLCTensor>,
366 ) -> Retained<Self>;
367
368 #[cfg(feature = "MLCTypes")]
369 #[deprecated]
377 #[unsafe(method(cosineDistanceLossWithReductionType:weight:))]
378 #[unsafe(method_family = none)]
379 pub unsafe fn cosineDistanceLossWithReductionType_weight(
380 reduction_type: MLCReductionType,
381 weight: c_float,
382 ) -> Retained<Self>;
383
384 #[cfg(all(feature = "MLCTensor", feature = "MLCTypes"))]
385 #[deprecated]
393 #[unsafe(method(cosineDistanceLossWithReductionType:weights:))]
394 #[unsafe(method_family = none)]
395 pub unsafe fn cosineDistanceLossWithReductionType_weights(
396 reduction_type: MLCReductionType,
397 weights: Option<&MLCTensor>,
398 ) -> Retained<Self>;
399 );
400}
401
402#[cfg(all(feature = "MLCLayer", feature = "MLCLossLayer"))]
404impl MLCYOLOLossLayer {
405 extern_methods!(
406 #[deprecated]
407 #[unsafe(method(new))]
408 #[unsafe(method_family = new)]
409 pub unsafe fn new() -> Retained<Self>;
410
411 #[deprecated]
412 #[unsafe(method(init))]
413 #[unsafe(method_family = init)]
414 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
415 );
416}