objc2_ml_compute/generated/
MLCLayerNormalizationLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(MLCLayer, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "MLCLayer")]
17 #[deprecated]
18 pub struct MLCLayerNormalizationLayer;
19);
20
21#[cfg(feature = "MLCLayer")]
22extern_conformance!(
23 unsafe impl NSObjectProtocol for MLCLayerNormalizationLayer {}
24);
25
26#[cfg(feature = "MLCLayer")]
27impl MLCLayerNormalizationLayer {
28 extern_methods!(
29 #[deprecated]
31 #[unsafe(method(normalizedShape))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn normalizedShape(&self) -> Retained<NSArray<NSNumber>>;
34
35 #[cfg(feature = "MLCTensor")]
36 #[deprecated]
38 #[unsafe(method(beta))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn beta(&self) -> Option<Retained<MLCTensor>>;
41
42 #[cfg(feature = "MLCTensor")]
43 #[deprecated]
45 #[unsafe(method(gamma))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn gamma(&self) -> Option<Retained<MLCTensor>>;
48
49 #[cfg(feature = "MLCTensorParameter")]
50 #[deprecated]
52 #[unsafe(method(betaParameter))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn betaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
55
56 #[cfg(feature = "MLCTensorParameter")]
57 #[deprecated]
59 #[unsafe(method(gammaParameter))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn gammaParameter(&self) -> Option<Retained<MLCTensorParameter>>;
62
63 #[deprecated]
65 #[unsafe(method(varianceEpsilon))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn varianceEpsilon(&self) -> c_float;
68
69 #[cfg(feature = "MLCTensor")]
70 #[deprecated]
82 #[unsafe(method(layerWithNormalizedShape:beta:gamma:varianceEpsilon:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn layerWithNormalizedShape_beta_gamma_varianceEpsilon(
85 normalized_shape: &NSArray<NSNumber>,
86 beta: Option<&MLCTensor>,
87 gamma: Option<&MLCTensor>,
88 variance_epsilon: c_float,
89 ) -> Option<Retained<Self>>;
90 );
91}
92
93#[cfg(feature = "MLCLayer")]
95impl MLCLayerNormalizationLayer {
96 extern_methods!(
97 #[deprecated]
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new() -> Retained<Self>;
101
102 #[deprecated]
103 #[unsafe(method(init))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106 );
107}