@octane-xplat/macos-renderer 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -20
- package/package.json +15 -2
- package/src/appearance.ts +2 -0
- package/src/fonts.ts +2 -0
- package/src/formatted-text.ts +147 -0
- package/src/gestures.ts +196 -0
- package/src/host-globals.d.ts +55 -0
- package/src/html-text.ts +88 -0
- package/src/image.ts +91 -16
- package/src/index.d.ts +9 -0
- package/src/index.ts +5030 -678
- package/src/layer.ts +11 -9
- package/src/list-template.ts +266 -0
- package/src/list-view.ts +445 -0
- package/src/portal-components.macos.tsx +86 -0
- package/src/presentation.ts +48 -15
- package/src/scroll-view.ts +124 -0
- package/src/tab-view.ts +512 -0
- package/src/template-props.ts +402 -0
- package/src/vendor/listview/LICENSE +19 -0
- package/src/vendor/listview/README.md +1 -0
- package/src/vendor/listview/binding-options.ts +189 -0
- package/src/vendor/listview/expressions.ts +285 -0
- package/src/webview.ts +36 -7
- package/types/ARKitCore.d.ts +199 -0
- package/types/AVFAudio.d.ts +2304 -0
- package/types/AVFoundation.d.ts +6974 -0
- package/types/AVKit.d.ts +215 -0
- package/types/AVRouting.d.ts +7 -0
- package/types/Accelerate.d.ts +4776 -0
- package/types/Accessibility.d.ts +69 -0
- package/types/Accounts.d.ts +134 -0
- package/types/AdSupport.d.ts +12 -0
- package/types/AddressBook.d.ts +1012 -0
- package/types/AppKit.d.ts +34247 -0
- package/types/AppTrackingTransparency.d.ts +23 -0
- package/types/AppleScriptKit.d.ts +6 -0
- package/types/ApplicationServices.d.ts +6346 -0
- package/types/AudioToolbox.d.ts +7129 -0
- package/types/AudioVideoBridging.d.ts +613 -0
- package/types/AuthenticationServices.d.ts +982 -0
- package/types/AutomaticAssessmentConfiguration.d.ts +46 -0
- package/types/Automator.d.ts +248 -0
- package/types/BackgroundAssets.d.ts +9 -0
- package/types/BrowserEngineKit.d.ts +166 -0
- package/types/BusinessChat.d.ts +29 -0
- package/types/CFNetwork.d.ts +931 -0
- package/types/CalendarStore.d.ts +354 -0
- package/types/CallKit.d.ts +30 -0
- package/types/Carbon.d.ts +16207 -0
- package/types/ClassKit.d.ts +281 -0
- package/types/CloudKit.d.ts +1565 -0
- package/types/Collaboration.d.ts +123 -0
- package/types/ColorSync.d.ts +562 -0
- package/types/CompositorServices.d.ts +60 -0
- package/types/ComputeGraph.d.ts +16 -0
- package/types/Contacts.d.ts +1558 -0
- package/types/ContactsUI.d.ts +39 -0
- package/types/CoreAudio.d.ts +1376 -0
- package/types/CoreAudioKit.d.ts +122 -0
- package/types/CoreAudioTypes.d.ts +1003 -0
- package/types/CoreBluetooth.d.ts +657 -0
- package/types/CoreData.d.ts +2479 -0
- package/types/CoreFoundation.d.ts +5546 -0
- package/types/CoreGraphics.d.ts +3676 -0
- package/types/CoreHaptics.d.ts +361 -0
- package/types/CoreImage.d.ts +4781 -0
- package/types/CoreLocation.d.ts +564 -0
- package/types/CoreMIDI.d.ts +1538 -0
- package/types/CoreML.d.ts +905 -0
- package/types/CoreMedia.d.ts +2615 -0
- package/types/CoreMediaIO.d.ts +1046 -0
- package/types/CoreMotion.d.ts +316 -0
- package/types/CoreServices.d.ts +24810 -0
- package/types/CoreSpotlight.d.ts +789 -0
- package/types/CoreTelephony.d.ts +31 -0
- package/types/CoreText.d.ts +3973 -0
- package/types/CoreTransferable.d.ts +3 -0
- package/types/CoreVideo.d.ts +1162 -0
- package/types/CoreWLAN.d.ts +556 -0
- package/types/CryptoTokenKit.d.ts +548 -0
- package/types/DVDPlayback.d.ts +931 -0
- package/types/DataDetection.d.ts +66 -0
- package/types/DeviceCheck.d.ts +46 -0
- package/types/DeviceDiscoveryExtension.d.ts +142 -0
- package/types/DirectoryService.d.ts +966 -0
- package/types/DiscRecording.d.ts +2345 -0
- package/types/DiscRecordingUI.d.ts +288 -0
- package/types/DiskArbitration.d.ts +366 -0
- package/types/DriverKit.d.ts +639 -0
- package/types/EventKit.d.ts +640 -0
- package/types/ExceptionHandling.d.ts +56 -0
- package/types/ExecutionPolicy.d.ts +30 -0
- package/types/ExternalAccessory.d.ts +98 -0
- package/types/FSKit.d.ts +237 -0
- package/types/FileProvider.d.ts +495 -0
- package/types/FileProviderUI.d.ts +31 -0
- package/types/FinderSync.d.ts +165 -0
- package/types/FocusEngine.d.ts +133 -0
- package/types/ForceFeedback.d.ts +399 -0
- package/types/Foundation.d.ts +18216 -0
- package/types/GLKit.d.ts +937 -0
- package/types/GLUT.d.ts +1018 -0
- package/types/GSS.d.ts +855 -0
- package/types/GameController.d.ts +1394 -0
- package/types/GameKit.d.ts +1958 -0
- package/types/GameSave.d.ts +54 -0
- package/types/GameplayKit.d.ts +1645 -0
- package/types/HealthKit.d.ts +278 -0
- package/types/Hypervisor.d.ts +2079 -0
- package/types/ICADevices.d.ts +1400 -0
- package/types/IOBluetooth.d.ts +6094 -0
- package/types/IOBluetoothUI.d.ts +250 -0
- package/types/IOKit.d.ts +25804 -0
- package/types/IOSurface.d.ts +435 -0
- package/types/IOUSBHost.d.ts +809 -0
- package/types/ImageCaptureCore.d.ts +1104 -0
- package/types/ImageIO.d.ts +1697 -0
- package/types/InputMethodKit.d.ts +264 -0
- package/types/InstallerPlugins.d.ts +102 -0
- package/types/InstantMessage.d.ts +229 -0
- package/types/Intents.d.ts +1833 -0
- package/types/IntentsUI.d.ts +5 -0
- package/types/JavaRuntimeSupport.d.ts +520 -0
- package/types/JavaScriptCore.d.ts +934 -0
- package/types/Kerberos.d.ts +3754 -0
- package/types/Kernel.d.ts +33698 -0
- package/types/KernelManagement.d.ts +5 -0
- package/types/LatentSemanticMapping.d.ts +152 -0
- package/types/LinkPresentation.d.ts +57 -0
- package/types/LocalAuthentication.d.ts +94 -0
- package/types/MLCompute.d.ts +2343 -0
- package/types/MapKit.d.ts +2125 -0
- package/types/Matter.d.ts +151 -0
- package/types/MediaAccessibility.d.ts +137 -0
- package/types/MediaLibrary.d.ts +394 -0
- package/types/MediaPlayer.d.ts +475 -0
- package/types/MediaToolbox.d.ts +70 -0
- package/types/Metal.d.ts +4542 -0
- package/types/MetalFX.d.ts +107 -0
- package/types/MetalKit.d.ts +524 -0
- package/types/MetalPerformanceShaders.d.ts +9306 -0
- package/types/MetalPerformanceShadersGraph.d.ts +1394 -0
- package/types/MetricKit.d.ts +231 -0
- package/types/ModelIO.d.ts +2908 -0
- package/types/MultipeerConnectivity.d.ts +348 -0
- package/types/NaturalLanguage.d.ts +556 -0
- package/types/NearbyInteraction.d.ts +51 -0
- package/types/NetFS.d.ts +99 -0
- package/types/Network.d.ts +1622 -0
- package/types/NetworkExtension.d.ts +1574 -0
- package/types/NotificationCenter.d.ts +103 -0
- package/types/OSAKit.d.ts +260 -0
- package/types/OSLog.d.ts +208 -0
- package/types/OpenAL.d.ts +314 -0
- package/types/OpenCL.d.ts +2489 -0
- package/types/OpenDirectory.d.ts +1919 -0
- package/types/OpenGL.d.ts +11322 -0
- package/types/PCSC.d.ts +534 -0
- package/types/PDFKit.d.ts +1575 -0
- package/types/PHASE.d.ts +166 -0
- package/types/ParavirtualizedGraphics.d.ts +153 -0
- package/types/PassKit.d.ts +1287 -0
- package/types/PencilKit.d.ts +201 -0
- package/types/Photos.d.ts +1125 -0
- package/types/PhotosUI.d.ts +397 -0
- package/types/PreferencePanes.d.ts +68 -0
- package/types/ProximityReaderStub.d.ts +5 -0
- package/types/PushKit.d.ts +45 -0
- package/types/Quartz.d.ts +1642 -0
- package/types/QuartzCore.d.ts +1398 -0
- package/types/QuickLook.d.ts +212 -0
- package/types/QuickLookThumbnailing.d.ts +131 -0
- package/types/QuickLookUI.d.ts +117 -0
- package/types/REVISION.json +5 -0
- package/types/ReplayKit.d.ts +294 -0
- package/types/Runtime.d.ts +51605 -0
- package/types/SafariServices.d.ts +430 -0
- package/types/SafetyKit.d.ts +7 -0
- package/types/SceneKit.d.ts +4996 -0
- package/types/ScreenCaptureKit.d.ts +16 -0
- package/types/ScreenSaver.d.ts +41 -0
- package/types/ScreenTime.d.ts +41 -0
- package/types/ScriptingBridge.d.ts +96 -0
- package/types/Security.d.ts +14336 -0
- package/types/SecurityFoundation.d.ts +53 -0
- package/types/SecurityInterface.d.ts +297 -0
- package/types/SensorKit.d.ts +7 -0
- package/types/ServiceManagement.d.ts +71 -0
- package/types/SharedWithYou.d.ts +9 -0
- package/types/SharedWithYouCore.d.ts +5 -0
- package/types/ShazamKit.d.ts +12 -0
- package/types/Social.d.ts +306 -0
- package/types/SoundAnalysis.d.ts +177 -0
- package/types/Speech.d.ts +246 -0
- package/types/SpriteKit.d.ts +2766 -0
- package/types/StoreKit.d.ts +509 -0
- package/types/SyncServices.d.ts +551 -0
- package/types/SystemConfiguration.d.ts +1415 -0
- package/types/SystemExtensions.d.ts +89 -0
- package/types/TWAIN.d.ts +380 -0
- package/types/Tcl.d.ts +4013 -0
- package/types/ThreadNetwork.d.ts +77 -0
- package/types/Tk.d.ts +3750 -0
- package/types/UIUtilities.d.ts +31 -0
- package/types/UniformTypeIdentifiers.d.ts +358 -0
- package/types/UserNotifications.d.ts +538 -0
- package/types/UserNotificationsUI.d.ts +38 -0
- package/types/VideoDecodeAcceleration.d.ts +50 -0
- package/types/VideoSubscriberAccount.d.ts +139 -0
- package/types/VideoToolbox.d.ts +907 -0
- package/types/Virtualization.d.ts +302 -0
- package/types/Vision.d.ts +1723 -0
- package/types/WebKit.d.ts +5195 -0
- package/types/WidgetKit.d.ts +9 -0
- package/types/_LocationEssentials.d.ts +159 -0
- package/types/_ScreenCaptureKit_SwiftUI.d.ts +5 -0
- package/types/iTunesLibrary.d.ts +528 -0
- package/types/index.d.ts +9 -0
- package/types/vecLib.d.ts +33586 -0
- package/types/vmnet.d.ts +178 -0
- package/src/appkit.d.ts +0 -472
|
@@ -0,0 +1,2343 @@
|
|
|
1
|
+
/// <reference types="@nativescript/objc-node-api" />
|
|
2
|
+
/// <reference path="./Runtime.d.ts" />
|
|
3
|
+
|
|
4
|
+
declare const MLCRandomInitializerType: {
|
|
5
|
+
Invalid: 0
|
|
6
|
+
Uniform: 1
|
|
7
|
+
GlorotUniform: 2
|
|
8
|
+
Xavier: 3
|
|
9
|
+
Count: 4
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const MLCGradientClippingType: {
|
|
13
|
+
Value: 0
|
|
14
|
+
Norm: 1
|
|
15
|
+
GlobalNorm: 2
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const MLCRegularizationType: {
|
|
19
|
+
None: 0
|
|
20
|
+
L1: 1
|
|
21
|
+
L2: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const MLCPaddingType: {
|
|
25
|
+
Zero: 0
|
|
26
|
+
Reflect: 1
|
|
27
|
+
Symmetric: 2
|
|
28
|
+
Constant: 3
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const MLCConvolutionType: {
|
|
32
|
+
Standard: 0
|
|
33
|
+
Transposed: 1
|
|
34
|
+
Depthwise: 2
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const MLCActivationType: {
|
|
38
|
+
None: 0
|
|
39
|
+
ReLU: 1
|
|
40
|
+
Linear: 2
|
|
41
|
+
Sigmoid: 3
|
|
42
|
+
HardSigmoid: 4
|
|
43
|
+
Tanh: 5
|
|
44
|
+
Absolute: 6
|
|
45
|
+
SoftPlus: 7
|
|
46
|
+
SoftSign: 8
|
|
47
|
+
ELU: 9
|
|
48
|
+
ReLUN: 10
|
|
49
|
+
LogSigmoid: 11
|
|
50
|
+
SELU: 12
|
|
51
|
+
CELU: 13
|
|
52
|
+
HardShrink: 14
|
|
53
|
+
SoftShrink: 15
|
|
54
|
+
TanhShrink: 16
|
|
55
|
+
Threshold: 17
|
|
56
|
+
GELU: 18
|
|
57
|
+
Count: 21
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const MLCArithmeticOperation: {
|
|
61
|
+
Add: 0
|
|
62
|
+
Subtract: 1
|
|
63
|
+
Multiply: 2
|
|
64
|
+
Divide: 3
|
|
65
|
+
Floor: 4
|
|
66
|
+
Round: 5
|
|
67
|
+
Ceil: 6
|
|
68
|
+
Sqrt: 7
|
|
69
|
+
Rsqrt: 8
|
|
70
|
+
Sin: 9
|
|
71
|
+
Cos: 10
|
|
72
|
+
Tan: 11
|
|
73
|
+
Asin: 12
|
|
74
|
+
Acos: 13
|
|
75
|
+
Atan: 14
|
|
76
|
+
Sinh: 15
|
|
77
|
+
Cosh: 16
|
|
78
|
+
Tanh: 17
|
|
79
|
+
Asinh: 18
|
|
80
|
+
Acosh: 19
|
|
81
|
+
Atanh: 20
|
|
82
|
+
Pow: 21
|
|
83
|
+
Exp: 22
|
|
84
|
+
Exp2: 23
|
|
85
|
+
Log: 24
|
|
86
|
+
Log2: 25
|
|
87
|
+
Count: 30
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare const MLCComparisonOperation: {
|
|
91
|
+
Equal: 0
|
|
92
|
+
NotEqual: 1
|
|
93
|
+
Less: 2
|
|
94
|
+
Greater: 3
|
|
95
|
+
LessOrEqual: 4
|
|
96
|
+
GreaterOrEqual: 5
|
|
97
|
+
LogicalAND: 6
|
|
98
|
+
LogicalOR: 7
|
|
99
|
+
LogicalNOT: 8
|
|
100
|
+
LogicalNAND: 9
|
|
101
|
+
LogicalNOR: 10
|
|
102
|
+
LogicalXOR: 11
|
|
103
|
+
Count: 12
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare const MLCExecutionOptions: {
|
|
107
|
+
None: 0
|
|
108
|
+
SkipWritingInputDataToDevice: 1
|
|
109
|
+
Synchronous: 2
|
|
110
|
+
Profiling: 4
|
|
111
|
+
ForwardForInference: 8
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare const MLCPaddingPolicy: {
|
|
115
|
+
Same: 0
|
|
116
|
+
Valid: 1
|
|
117
|
+
UsePaddingSize: 2
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare const MLCDataType: {
|
|
121
|
+
Invalid: 0
|
|
122
|
+
Float32: 1
|
|
123
|
+
Boolean: 4
|
|
124
|
+
Int64: 5
|
|
125
|
+
Int32: 7
|
|
126
|
+
Count: 10
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare const MLCSampleMode: {
|
|
130
|
+
Nearest: 0
|
|
131
|
+
Linear: 1
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare const MLCReductionType: {
|
|
135
|
+
None: 0
|
|
136
|
+
Sum: 1
|
|
137
|
+
Mean: 2
|
|
138
|
+
Max: 3
|
|
139
|
+
Min: 4
|
|
140
|
+
ArgMax: 5
|
|
141
|
+
ArgMin: 6
|
|
142
|
+
Count: 10
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare const MLCLSTMResultMode: {
|
|
146
|
+
MLCLSTMResultModeOutput: 0
|
|
147
|
+
AndStates: 1
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare const MLCLossType: {
|
|
151
|
+
MeanAbsoluteError: 0
|
|
152
|
+
MeanSquaredError: 1
|
|
153
|
+
SoftmaxCrossEntropy: 2
|
|
154
|
+
SigmoidCrossEntropy: 3
|
|
155
|
+
CategoricalCrossEntropy: 4
|
|
156
|
+
Hinge: 5
|
|
157
|
+
Huber: 6
|
|
158
|
+
CosineDistance: 7
|
|
159
|
+
Log: 8
|
|
160
|
+
Count: 9
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare const MLCSoftmaxOperation: {
|
|
164
|
+
MLCSoftmaxOperationSoftmax: 0
|
|
165
|
+
Log: 1
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
declare const MLCPoolingType: {
|
|
169
|
+
Max: 1
|
|
170
|
+
Average: 2
|
|
171
|
+
L2Norm: 3
|
|
172
|
+
Count: 4
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare const MLCDeviceType: {
|
|
176
|
+
CPU: 0
|
|
177
|
+
GPU: 1
|
|
178
|
+
Any: 2
|
|
179
|
+
Count: 4
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare const MLCGraphCompilationOptions: {
|
|
183
|
+
None: 0
|
|
184
|
+
DebugLayers: 1
|
|
185
|
+
DisableLayerFusion: 2
|
|
186
|
+
LinkGraphs: 4
|
|
187
|
+
ComputeAllGradients: 8
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
declare function MLCActivationTypeDebugDescription(
|
|
191
|
+
activationType: interop.Enum<typeof MLCActivationType>,
|
|
192
|
+
): string
|
|
193
|
+
|
|
194
|
+
declare function MLCArithmeticOperationDebugDescription(
|
|
195
|
+
operation: interop.Enum<typeof MLCArithmeticOperation>,
|
|
196
|
+
): string
|
|
197
|
+
|
|
198
|
+
declare function MLCPaddingPolicyDebugDescription(
|
|
199
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
200
|
+
): string
|
|
201
|
+
|
|
202
|
+
declare function MLCLossTypeDebugDescription(lossType: interop.Enum<typeof MLCLossType>): string
|
|
203
|
+
|
|
204
|
+
declare function MLCReductionTypeDebugDescription(
|
|
205
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
206
|
+
): string
|
|
207
|
+
|
|
208
|
+
declare function MLCPaddingTypeDebugDescription(
|
|
209
|
+
paddingType: interop.Enum<typeof MLCPaddingType>,
|
|
210
|
+
): string
|
|
211
|
+
|
|
212
|
+
declare function MLCConvolutionTypeDebugDescription(
|
|
213
|
+
convolutionType: interop.Enum<typeof MLCConvolutionType>,
|
|
214
|
+
): string
|
|
215
|
+
|
|
216
|
+
declare function MLCPoolingTypeDebugDescription(
|
|
217
|
+
poolingType: interop.Enum<typeof MLCPoolingType>,
|
|
218
|
+
): string
|
|
219
|
+
|
|
220
|
+
declare function MLCSoftmaxOperationDebugDescription(
|
|
221
|
+
operation: interop.Enum<typeof MLCSoftmaxOperation>,
|
|
222
|
+
): string
|
|
223
|
+
|
|
224
|
+
declare function MLCSampleModeDebugDescription(mode: interop.Enum<typeof MLCSampleMode>): string
|
|
225
|
+
|
|
226
|
+
declare function MLCLSTMResultModeDebugDescription(
|
|
227
|
+
mode: interop.Enum<typeof MLCLSTMResultMode>,
|
|
228
|
+
): string
|
|
229
|
+
|
|
230
|
+
declare class MLCAdamOptimizer extends MLCOptimizer implements NSCopying {
|
|
231
|
+
readonly beta1: number
|
|
232
|
+
|
|
233
|
+
readonly beta2: number
|
|
234
|
+
|
|
235
|
+
readonly epsilon: number
|
|
236
|
+
|
|
237
|
+
readonly usesAMSGrad: boolean
|
|
238
|
+
|
|
239
|
+
readonly timeStep: number
|
|
240
|
+
|
|
241
|
+
static optimizerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
242
|
+
this: This,
|
|
243
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
244
|
+
): InstanceType<This>
|
|
245
|
+
|
|
246
|
+
static optimizerWithDescriptorBeta1Beta2EpsilonTimeStep<
|
|
247
|
+
This extends abstract new (...args: any) => any,
|
|
248
|
+
>(
|
|
249
|
+
this: This,
|
|
250
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
251
|
+
beta1: number,
|
|
252
|
+
beta2: number,
|
|
253
|
+
epsilon: number,
|
|
254
|
+
timeStep: number,
|
|
255
|
+
): InstanceType<This>
|
|
256
|
+
|
|
257
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
declare class MLCSGDOptimizer extends MLCOptimizer implements NSCopying {
|
|
261
|
+
readonly momentumScale: number
|
|
262
|
+
|
|
263
|
+
readonly usesNesterovMomentum: boolean
|
|
264
|
+
|
|
265
|
+
static optimizerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
266
|
+
this: This,
|
|
267
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
268
|
+
): InstanceType<This>
|
|
269
|
+
|
|
270
|
+
static optimizerWithDescriptorMomentumScaleUsesNesterovMomentum<
|
|
271
|
+
This extends abstract new (...args: any) => any,
|
|
272
|
+
>(
|
|
273
|
+
this: This,
|
|
274
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
275
|
+
momentumScale: number,
|
|
276
|
+
usesNesterovMomentum: boolean,
|
|
277
|
+
): InstanceType<This>
|
|
278
|
+
|
|
279
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare class MLCEmbeddingLayer extends MLCLayer {
|
|
283
|
+
readonly descriptor: MLCEmbeddingDescriptor
|
|
284
|
+
|
|
285
|
+
readonly weights: MLCTensor
|
|
286
|
+
|
|
287
|
+
readonly weightsParameter: MLCTensorParameter
|
|
288
|
+
|
|
289
|
+
static layerWithDescriptorWeights<This extends abstract new (...args: any) => any>(
|
|
290
|
+
this: This,
|
|
291
|
+
descriptor: MLCEmbeddingDescriptor,
|
|
292
|
+
weights: MLCTensor,
|
|
293
|
+
): InstanceType<This>
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
declare class MLCSliceLayer extends MLCLayer {
|
|
297
|
+
readonly start: NSArray
|
|
298
|
+
|
|
299
|
+
readonly end: NSArray
|
|
300
|
+
|
|
301
|
+
readonly stride: NSArray
|
|
302
|
+
|
|
303
|
+
static sliceLayerWithStartEndStride<This extends abstract new (...args: any) => any>(
|
|
304
|
+
this: This,
|
|
305
|
+
start: NSArray<interop.Object> | Array<interop.Object>,
|
|
306
|
+
end: NSArray<interop.Object> | Array<interop.Object>,
|
|
307
|
+
stride: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
308
|
+
): InstanceType<This> | null
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
declare class MLCSplitLayer extends MLCLayer {
|
|
312
|
+
readonly dimension: number
|
|
313
|
+
|
|
314
|
+
readonly splitCount: number
|
|
315
|
+
|
|
316
|
+
readonly splitSectionLengths: NSArray
|
|
317
|
+
|
|
318
|
+
static layerWithSplitCountDimension<This extends abstract new (...args: any) => any>(
|
|
319
|
+
this: This,
|
|
320
|
+
splitCount: number,
|
|
321
|
+
dimension: number,
|
|
322
|
+
): InstanceType<This>
|
|
323
|
+
|
|
324
|
+
static layerWithSplitSectionLengthsDimension<This extends abstract new (...args: any) => any>(
|
|
325
|
+
this: This,
|
|
326
|
+
splitSectionLengths: NSArray<interop.Object> | Array<interop.Object>,
|
|
327
|
+
dimension: number,
|
|
328
|
+
): InstanceType<This>
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
declare class MLCReductionLayer extends MLCLayer {
|
|
332
|
+
readonly reductionType: interop.Enum<typeof MLCReductionType>
|
|
333
|
+
|
|
334
|
+
readonly dimension: number
|
|
335
|
+
|
|
336
|
+
static layerWithReductionTypeDimension<This extends abstract new (...args: any) => any>(
|
|
337
|
+
this: This,
|
|
338
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
339
|
+
dimension: number,
|
|
340
|
+
): InstanceType<This> | null
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
declare class MLCSoftmaxLayer extends MLCLayer {
|
|
344
|
+
readonly operation: interop.Enum<typeof MLCSoftmaxOperation>
|
|
345
|
+
|
|
346
|
+
readonly dimension: number
|
|
347
|
+
|
|
348
|
+
static layerWithOperation<This extends abstract new (...args: any) => any>(
|
|
349
|
+
this: This,
|
|
350
|
+
operation: interop.Enum<typeof MLCSoftmaxOperation>,
|
|
351
|
+
): InstanceType<This>
|
|
352
|
+
|
|
353
|
+
static layerWithOperationDimension<This extends abstract new (...args: any) => any>(
|
|
354
|
+
this: This,
|
|
355
|
+
operation: interop.Enum<typeof MLCSoftmaxOperation>,
|
|
356
|
+
dimension: number,
|
|
357
|
+
): InstanceType<This>
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
declare class MLCLayerNormalizationLayer extends MLCLayer {
|
|
361
|
+
readonly normalizedShape: NSArray
|
|
362
|
+
|
|
363
|
+
readonly beta: MLCTensor
|
|
364
|
+
|
|
365
|
+
readonly gamma: MLCTensor
|
|
366
|
+
|
|
367
|
+
readonly betaParameter: MLCTensorParameter
|
|
368
|
+
|
|
369
|
+
readonly gammaParameter: MLCTensorParameter
|
|
370
|
+
|
|
371
|
+
readonly varianceEpsilon: number
|
|
372
|
+
|
|
373
|
+
static layerWithNormalizedShapeBetaGammaVarianceEpsilon<
|
|
374
|
+
This extends abstract new (...args: any) => any,
|
|
375
|
+
>(
|
|
376
|
+
this: This,
|
|
377
|
+
normalizedShape: NSArray<interop.Object> | Array<interop.Object>,
|
|
378
|
+
beta: MLCTensor | null,
|
|
379
|
+
gamma: MLCTensor | null,
|
|
380
|
+
varianceEpsilon: number,
|
|
381
|
+
): InstanceType<This> | null
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
declare class MLCInstanceNormalizationLayer extends MLCLayer {
|
|
385
|
+
readonly featureChannelCount: number
|
|
386
|
+
|
|
387
|
+
readonly beta: MLCTensor
|
|
388
|
+
|
|
389
|
+
readonly gamma: MLCTensor
|
|
390
|
+
|
|
391
|
+
readonly betaParameter: MLCTensorParameter
|
|
392
|
+
|
|
393
|
+
readonly gammaParameter: MLCTensorParameter
|
|
394
|
+
|
|
395
|
+
readonly varianceEpsilon: number
|
|
396
|
+
|
|
397
|
+
readonly momentum: number
|
|
398
|
+
|
|
399
|
+
static layerWithFeatureChannelCountBetaGammaVarianceEpsilon<
|
|
400
|
+
This extends abstract new (...args: any) => any,
|
|
401
|
+
>(
|
|
402
|
+
this: This,
|
|
403
|
+
featureChannelCount: number,
|
|
404
|
+
beta: MLCTensor | null,
|
|
405
|
+
gamma: MLCTensor | null,
|
|
406
|
+
varianceEpsilon: number,
|
|
407
|
+
): InstanceType<This> | null
|
|
408
|
+
|
|
409
|
+
static layerWithFeatureChannelCountBetaGammaVarianceEpsilonMomentum<
|
|
410
|
+
This extends abstract new (...args: any) => any,
|
|
411
|
+
>(
|
|
412
|
+
this: This,
|
|
413
|
+
featureChannelCount: number,
|
|
414
|
+
beta: MLCTensor | null,
|
|
415
|
+
gamma: MLCTensor | null,
|
|
416
|
+
varianceEpsilon: number,
|
|
417
|
+
momentum: number,
|
|
418
|
+
): InstanceType<This> | null
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
declare class MLCBatchNormalizationLayer extends MLCLayer {
|
|
422
|
+
readonly featureChannelCount: number
|
|
423
|
+
|
|
424
|
+
readonly mean: MLCTensor
|
|
425
|
+
|
|
426
|
+
readonly variance: MLCTensor
|
|
427
|
+
|
|
428
|
+
readonly beta: MLCTensor
|
|
429
|
+
|
|
430
|
+
readonly gamma: MLCTensor
|
|
431
|
+
|
|
432
|
+
readonly betaParameter: MLCTensorParameter
|
|
433
|
+
|
|
434
|
+
readonly gammaParameter: MLCTensorParameter
|
|
435
|
+
|
|
436
|
+
readonly varianceEpsilon: number
|
|
437
|
+
|
|
438
|
+
readonly momentum: number
|
|
439
|
+
|
|
440
|
+
static layerWithFeatureChannelCountMeanVarianceBetaGammaVarianceEpsilon<
|
|
441
|
+
This extends abstract new (...args: any) => any,
|
|
442
|
+
>(
|
|
443
|
+
this: This,
|
|
444
|
+
featureChannelCount: number,
|
|
445
|
+
mean: MLCTensor,
|
|
446
|
+
variance: MLCTensor,
|
|
447
|
+
beta: MLCTensor | null,
|
|
448
|
+
gamma: MLCTensor | null,
|
|
449
|
+
varianceEpsilon: number,
|
|
450
|
+
): InstanceType<This> | null
|
|
451
|
+
|
|
452
|
+
static layerWithFeatureChannelCountMeanVarianceBetaGammaVarianceEpsilonMomentum<
|
|
453
|
+
This extends abstract new (...args: any) => any,
|
|
454
|
+
>(
|
|
455
|
+
this: This,
|
|
456
|
+
featureChannelCount: number,
|
|
457
|
+
mean: MLCTensor,
|
|
458
|
+
variance: MLCTensor,
|
|
459
|
+
beta: MLCTensor | null,
|
|
460
|
+
gamma: MLCTensor | null,
|
|
461
|
+
varianceEpsilon: number,
|
|
462
|
+
momentum: number,
|
|
463
|
+
): InstanceType<This> | null
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
declare class MLCActivationLayer extends MLCLayer {
|
|
467
|
+
readonly descriptor: MLCActivationDescriptor
|
|
468
|
+
|
|
469
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
470
|
+
this: This,
|
|
471
|
+
descriptor: MLCActivationDescriptor,
|
|
472
|
+
): InstanceType<This>
|
|
473
|
+
|
|
474
|
+
static readonly reluLayer: MLCActivationLayer
|
|
475
|
+
|
|
476
|
+
static readonly relu6Layer: MLCActivationLayer
|
|
477
|
+
|
|
478
|
+
static readonly leakyReLULayer: MLCActivationLayer
|
|
479
|
+
|
|
480
|
+
static leakyReLULayerWithNegativeSlope<This extends abstract new (...args: any) => any>(
|
|
481
|
+
this: This,
|
|
482
|
+
negativeSlope: number,
|
|
483
|
+
): InstanceType<This>
|
|
484
|
+
|
|
485
|
+
static linearLayerWithScaleBias<This extends abstract new (...args: any) => any>(
|
|
486
|
+
this: This,
|
|
487
|
+
scale: number,
|
|
488
|
+
bias: number,
|
|
489
|
+
): InstanceType<This>
|
|
490
|
+
|
|
491
|
+
static readonly sigmoidLayer: MLCActivationLayer
|
|
492
|
+
|
|
493
|
+
static readonly hardSigmoidLayer: MLCActivationLayer
|
|
494
|
+
|
|
495
|
+
static readonly tanhLayer: MLCActivationLayer
|
|
496
|
+
|
|
497
|
+
static readonly absoluteLayer: MLCActivationLayer
|
|
498
|
+
|
|
499
|
+
static readonly softPlusLayer: MLCActivationLayer
|
|
500
|
+
|
|
501
|
+
static softPlusLayerWithBeta<This extends abstract new (...args: any) => any>(
|
|
502
|
+
this: This,
|
|
503
|
+
beta: number,
|
|
504
|
+
): InstanceType<This>
|
|
505
|
+
|
|
506
|
+
static readonly softSignLayer: MLCActivationLayer
|
|
507
|
+
|
|
508
|
+
static readonly eluLayer: MLCActivationLayer
|
|
509
|
+
|
|
510
|
+
static eluLayerWithA<This extends abstract new (...args: any) => any>(
|
|
511
|
+
this: This,
|
|
512
|
+
a: number,
|
|
513
|
+
): InstanceType<This>
|
|
514
|
+
|
|
515
|
+
static relunLayerWithAB<This extends abstract new (...args: any) => any>(
|
|
516
|
+
this: This,
|
|
517
|
+
a: number,
|
|
518
|
+
b: number,
|
|
519
|
+
): InstanceType<This>
|
|
520
|
+
|
|
521
|
+
static readonly logSigmoidLayer: MLCActivationLayer
|
|
522
|
+
|
|
523
|
+
static readonly seluLayer: MLCActivationLayer
|
|
524
|
+
|
|
525
|
+
static readonly celuLayer: MLCActivationLayer
|
|
526
|
+
|
|
527
|
+
static celuLayerWithA<This extends abstract new (...args: any) => any>(
|
|
528
|
+
this: This,
|
|
529
|
+
a: number,
|
|
530
|
+
): InstanceType<This>
|
|
531
|
+
|
|
532
|
+
static readonly hardShrinkLayer: MLCActivationLayer
|
|
533
|
+
|
|
534
|
+
static hardShrinkLayerWithA<This extends abstract new (...args: any) => any>(
|
|
535
|
+
this: This,
|
|
536
|
+
a: number,
|
|
537
|
+
): InstanceType<This>
|
|
538
|
+
|
|
539
|
+
static readonly softShrinkLayer: MLCActivationLayer
|
|
540
|
+
|
|
541
|
+
static softShrinkLayerWithA<This extends abstract new (...args: any) => any>(
|
|
542
|
+
this: This,
|
|
543
|
+
a: number,
|
|
544
|
+
): InstanceType<This>
|
|
545
|
+
|
|
546
|
+
static readonly tanhShrinkLayer: MLCActivationLayer
|
|
547
|
+
|
|
548
|
+
static thresholdLayerWithThresholdReplacement<This extends abstract new (...args: any) => any>(
|
|
549
|
+
this: This,
|
|
550
|
+
threshold: number,
|
|
551
|
+
replacement: number,
|
|
552
|
+
): InstanceType<This>
|
|
553
|
+
|
|
554
|
+
static readonly geluLayer: MLCActivationLayer
|
|
555
|
+
|
|
556
|
+
static readonly hardSwishLayer: MLCActivationLayer
|
|
557
|
+
|
|
558
|
+
static clampLayerWithMinValueMaxValue<This extends abstract new (...args: any) => any>(
|
|
559
|
+
this: This,
|
|
560
|
+
minValue: number,
|
|
561
|
+
maxValue: number,
|
|
562
|
+
): InstanceType<This>
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
declare class MLCDropoutLayer extends MLCLayer {
|
|
566
|
+
readonly rate: number
|
|
567
|
+
|
|
568
|
+
readonly seed: number
|
|
569
|
+
|
|
570
|
+
static layerWithRateSeed<This extends abstract new (...args: any) => any>(
|
|
571
|
+
this: This,
|
|
572
|
+
rate: number,
|
|
573
|
+
seed: number,
|
|
574
|
+
): InstanceType<This>
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
declare class MLCMultiheadAttentionDescriptor extends NSObject implements NSCopying {
|
|
578
|
+
readonly modelDimension: number
|
|
579
|
+
|
|
580
|
+
readonly keyDimension: number
|
|
581
|
+
|
|
582
|
+
readonly valueDimension: number
|
|
583
|
+
|
|
584
|
+
readonly headCount: number
|
|
585
|
+
|
|
586
|
+
readonly dropout: number
|
|
587
|
+
|
|
588
|
+
readonly hasBiases: boolean
|
|
589
|
+
|
|
590
|
+
readonly hasAttentionBiases: boolean
|
|
591
|
+
|
|
592
|
+
readonly addsZeroAttention: boolean
|
|
593
|
+
|
|
594
|
+
static descriptorWithModelDimensionKeyDimensionValueDimensionHeadCountDropoutHasBiasesHasAttentionBiasesAddsZeroAttention<
|
|
595
|
+
This extends abstract new (...args: any) => any,
|
|
596
|
+
>(
|
|
597
|
+
this: This,
|
|
598
|
+
modelDimension: number,
|
|
599
|
+
keyDimension: number,
|
|
600
|
+
valueDimension: number,
|
|
601
|
+
headCount: number,
|
|
602
|
+
dropout: number,
|
|
603
|
+
hasBiases: boolean,
|
|
604
|
+
hasAttentionBiases: boolean,
|
|
605
|
+
addsZeroAttention: boolean,
|
|
606
|
+
): InstanceType<This> | null
|
|
607
|
+
|
|
608
|
+
static descriptorWithModelDimensionHeadCount<This extends abstract new (...args: any) => any>(
|
|
609
|
+
this: This,
|
|
610
|
+
modelDimension: number,
|
|
611
|
+
headCount: number,
|
|
612
|
+
): InstanceType<This>
|
|
613
|
+
|
|
614
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
declare class MLCOptimizerDescriptor extends NSObject implements NSCopying {
|
|
618
|
+
readonly learningRate: number
|
|
619
|
+
|
|
620
|
+
readonly gradientRescale: number
|
|
621
|
+
|
|
622
|
+
readonly appliesGradientClipping: boolean
|
|
623
|
+
|
|
624
|
+
readonly gradientClipMax: number
|
|
625
|
+
|
|
626
|
+
readonly gradientClipMin: number
|
|
627
|
+
|
|
628
|
+
readonly regularizationScale: number
|
|
629
|
+
|
|
630
|
+
readonly regularizationType: interop.Enum<typeof MLCRegularizationType>
|
|
631
|
+
|
|
632
|
+
static descriptorWithLearningRateGradientRescaleRegularizationTypeRegularizationScale<
|
|
633
|
+
This extends abstract new (...args: any) => any,
|
|
634
|
+
>(
|
|
635
|
+
this: This,
|
|
636
|
+
learningRate: number,
|
|
637
|
+
gradientRescale: number,
|
|
638
|
+
regularizationType: interop.Enum<typeof MLCRegularizationType>,
|
|
639
|
+
regularizationScale: number,
|
|
640
|
+
): InstanceType<This>
|
|
641
|
+
|
|
642
|
+
static descriptorWithLearningRateGradientRescaleAppliesGradientClippingGradientClipMaxGradientClipMinRegularizationTypeRegularizationScale<
|
|
643
|
+
This extends abstract new (...args: any) => any,
|
|
644
|
+
>(
|
|
645
|
+
this: This,
|
|
646
|
+
learningRate: number,
|
|
647
|
+
gradientRescale: number,
|
|
648
|
+
appliesGradientClipping: boolean,
|
|
649
|
+
gradientClipMax: number,
|
|
650
|
+
gradientClipMin: number,
|
|
651
|
+
regularizationType: interop.Enum<typeof MLCRegularizationType>,
|
|
652
|
+
regularizationScale: number,
|
|
653
|
+
): InstanceType<This>
|
|
654
|
+
|
|
655
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
declare class MLCTensorDescriptor extends NSObject implements NSCopying {
|
|
659
|
+
readonly dataType: interop.Enum<typeof MLCDataType>
|
|
660
|
+
|
|
661
|
+
readonly dimensionCount: number
|
|
662
|
+
|
|
663
|
+
readonly shape: NSArray
|
|
664
|
+
|
|
665
|
+
readonly stride: NSArray
|
|
666
|
+
|
|
667
|
+
readonly tensorAllocationSizeInBytes: number
|
|
668
|
+
|
|
669
|
+
readonly sequenceLengths: NSArray
|
|
670
|
+
|
|
671
|
+
readonly sortedSequences: boolean
|
|
672
|
+
|
|
673
|
+
readonly batchSizePerSequenceStep: NSArray
|
|
674
|
+
|
|
675
|
+
static readonly maxTensorDimensions: number
|
|
676
|
+
|
|
677
|
+
static descriptorWithShapeDataType<This extends abstract new (...args: any) => any>(
|
|
678
|
+
this: This,
|
|
679
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
680
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
681
|
+
): InstanceType<This> | null
|
|
682
|
+
|
|
683
|
+
static descriptorWithShapeSequenceLengthsSortedSequencesDataType<
|
|
684
|
+
This extends abstract new (...args: any) => any,
|
|
685
|
+
>(
|
|
686
|
+
this: This,
|
|
687
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
688
|
+
sequenceLengths: NSArray<interop.Object> | Array<interop.Object>,
|
|
689
|
+
sortedSequences: boolean,
|
|
690
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
691
|
+
): InstanceType<This> | null
|
|
692
|
+
|
|
693
|
+
static descriptorWithWidthHeightFeatureChannelCountBatchSize<
|
|
694
|
+
This extends abstract new (...args: any) => any,
|
|
695
|
+
>(
|
|
696
|
+
this: This,
|
|
697
|
+
width: number,
|
|
698
|
+
height: number,
|
|
699
|
+
featureChannels: number,
|
|
700
|
+
batchSize: number,
|
|
701
|
+
): InstanceType<This> | null
|
|
702
|
+
|
|
703
|
+
static descriptorWithWidthHeightFeatureChannelCountBatchSizeDataType<
|
|
704
|
+
This extends abstract new (...args: any) => any,
|
|
705
|
+
>(
|
|
706
|
+
this: This,
|
|
707
|
+
width: number,
|
|
708
|
+
height: number,
|
|
709
|
+
featureChannelCount: number,
|
|
710
|
+
batchSize: number,
|
|
711
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
712
|
+
): InstanceType<This> | null
|
|
713
|
+
|
|
714
|
+
static convolutionWeightsDescriptorWithWidthHeightInputFeatureChannelCountOutputFeatureChannelCountDataType<
|
|
715
|
+
This extends abstract new (...args: any) => any,
|
|
716
|
+
>(
|
|
717
|
+
this: This,
|
|
718
|
+
width: number,
|
|
719
|
+
height: number,
|
|
720
|
+
inputFeatureChannelCount: number,
|
|
721
|
+
outputFeatureChannelCount: number,
|
|
722
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
723
|
+
): InstanceType<This> | null
|
|
724
|
+
|
|
725
|
+
static convolutionWeightsDescriptorWithInputFeatureChannelCountOutputFeatureChannelCountDataType<
|
|
726
|
+
This extends abstract new (...args: any) => any,
|
|
727
|
+
>(
|
|
728
|
+
this: This,
|
|
729
|
+
inputFeatureChannelCount: number,
|
|
730
|
+
outputFeatureChannelCount: number,
|
|
731
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
732
|
+
): InstanceType<This> | null
|
|
733
|
+
|
|
734
|
+
static convolutionBiasesDescriptorWithFeatureChannelCountDataType<
|
|
735
|
+
This extends abstract new (...args: any) => any,
|
|
736
|
+
>(
|
|
737
|
+
this: This,
|
|
738
|
+
featureChannelCount: number,
|
|
739
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
740
|
+
): InstanceType<This> | null
|
|
741
|
+
|
|
742
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
declare class MLCLSTMDescriptor extends NSObject implements NSCopying {
|
|
746
|
+
readonly inputSize: number
|
|
747
|
+
|
|
748
|
+
readonly hiddenSize: number
|
|
749
|
+
|
|
750
|
+
readonly layerCount: number
|
|
751
|
+
|
|
752
|
+
readonly usesBiases: boolean
|
|
753
|
+
|
|
754
|
+
readonly batchFirst: boolean
|
|
755
|
+
|
|
756
|
+
readonly isBidirectional: boolean
|
|
757
|
+
|
|
758
|
+
readonly returnsSequences: boolean
|
|
759
|
+
|
|
760
|
+
readonly dropout: number
|
|
761
|
+
|
|
762
|
+
readonly resultMode: interop.Enum<typeof MLCLSTMResultMode>
|
|
763
|
+
|
|
764
|
+
static descriptorWithInputSizeHiddenSizeLayerCount<
|
|
765
|
+
This extends abstract new (...args: any) => any,
|
|
766
|
+
>(this: This, inputSize: number, hiddenSize: number, layerCount: number): InstanceType<This>
|
|
767
|
+
|
|
768
|
+
static descriptorWithInputSizeHiddenSizeLayerCountUsesBiasesIsBidirectionalDropout<
|
|
769
|
+
This extends abstract new (...args: any) => any,
|
|
770
|
+
>(
|
|
771
|
+
this: This,
|
|
772
|
+
inputSize: number,
|
|
773
|
+
hiddenSize: number,
|
|
774
|
+
layerCount: number,
|
|
775
|
+
usesBiases: boolean,
|
|
776
|
+
isBidirectional: boolean,
|
|
777
|
+
dropout: number,
|
|
778
|
+
): InstanceType<This>
|
|
779
|
+
|
|
780
|
+
static descriptorWithInputSizeHiddenSizeLayerCountUsesBiasesBatchFirstIsBidirectionalDropout<
|
|
781
|
+
This extends abstract new (...args: any) => any,
|
|
782
|
+
>(
|
|
783
|
+
this: This,
|
|
784
|
+
inputSize: number,
|
|
785
|
+
hiddenSize: number,
|
|
786
|
+
layerCount: number,
|
|
787
|
+
usesBiases: boolean,
|
|
788
|
+
batchFirst: boolean,
|
|
789
|
+
isBidirectional: boolean,
|
|
790
|
+
dropout: number,
|
|
791
|
+
): InstanceType<This>
|
|
792
|
+
|
|
793
|
+
static descriptorWithInputSizeHiddenSizeLayerCountUsesBiasesBatchFirstIsBidirectionalReturnsSequencesDropout<
|
|
794
|
+
This extends abstract new (...args: any) => any,
|
|
795
|
+
>(
|
|
796
|
+
this: This,
|
|
797
|
+
inputSize: number,
|
|
798
|
+
hiddenSize: number,
|
|
799
|
+
layerCount: number,
|
|
800
|
+
usesBiases: boolean,
|
|
801
|
+
batchFirst: boolean,
|
|
802
|
+
isBidirectional: boolean,
|
|
803
|
+
returnsSequences: boolean,
|
|
804
|
+
dropout: number,
|
|
805
|
+
): InstanceType<This>
|
|
806
|
+
|
|
807
|
+
static descriptorWithInputSizeHiddenSizeLayerCountUsesBiasesBatchFirstIsBidirectionalReturnsSequencesDropoutResultMode<
|
|
808
|
+
This extends abstract new (...args: any) => any,
|
|
809
|
+
>(
|
|
810
|
+
this: This,
|
|
811
|
+
inputSize: number,
|
|
812
|
+
hiddenSize: number,
|
|
813
|
+
layerCount: number,
|
|
814
|
+
usesBiases: boolean,
|
|
815
|
+
batchFirst: boolean,
|
|
816
|
+
isBidirectional: boolean,
|
|
817
|
+
returnsSequences: boolean,
|
|
818
|
+
dropout: number,
|
|
819
|
+
resultMode: interop.Enum<typeof MLCLSTMResultMode>,
|
|
820
|
+
): InstanceType<This>
|
|
821
|
+
|
|
822
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
declare class MLCYOLOLossDescriptor extends NSObject implements NSCopying {
|
|
826
|
+
readonly anchorBoxCount: number
|
|
827
|
+
|
|
828
|
+
readonly anchorBoxes: NSData
|
|
829
|
+
|
|
830
|
+
shouldRescore: boolean
|
|
831
|
+
|
|
832
|
+
scaleSpatialPositionLoss: number
|
|
833
|
+
|
|
834
|
+
scaleSpatialSizeLoss: number
|
|
835
|
+
|
|
836
|
+
scaleNoObjectConfidenceLoss: number
|
|
837
|
+
|
|
838
|
+
scaleObjectConfidenceLoss: number
|
|
839
|
+
|
|
840
|
+
scaleClassLoss: number
|
|
841
|
+
|
|
842
|
+
minimumIOUForObjectPresence: number
|
|
843
|
+
|
|
844
|
+
maximumIOUForObjectAbsence: number
|
|
845
|
+
|
|
846
|
+
static descriptorWithAnchorBoxesAnchorBoxCount<This extends abstract new (...args: any) => any>(
|
|
847
|
+
this: This,
|
|
848
|
+
anchorBoxes: NSData,
|
|
849
|
+
anchorBoxCount: number,
|
|
850
|
+
): InstanceType<This>
|
|
851
|
+
|
|
852
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
declare class MLCActivationDescriptor extends NSObject implements NSCopying {
|
|
856
|
+
readonly activationType: interop.Enum<typeof MLCActivationType>
|
|
857
|
+
|
|
858
|
+
readonly a: number
|
|
859
|
+
|
|
860
|
+
readonly b: number
|
|
861
|
+
|
|
862
|
+
readonly c: number
|
|
863
|
+
|
|
864
|
+
static descriptorWithType<This extends abstract new (...args: any) => any>(
|
|
865
|
+
this: This,
|
|
866
|
+
activationType: interop.Enum<typeof MLCActivationType>,
|
|
867
|
+
): InstanceType<This> | null
|
|
868
|
+
|
|
869
|
+
static descriptorWithTypeA<This extends abstract new (...args: any) => any>(
|
|
870
|
+
this: This,
|
|
871
|
+
activationType: interop.Enum<typeof MLCActivationType>,
|
|
872
|
+
a: number,
|
|
873
|
+
): InstanceType<This> | null
|
|
874
|
+
|
|
875
|
+
static descriptorWithTypeAB<This extends abstract new (...args: any) => any>(
|
|
876
|
+
this: This,
|
|
877
|
+
activationType: interop.Enum<typeof MLCActivationType>,
|
|
878
|
+
a: number,
|
|
879
|
+
b: number,
|
|
880
|
+
): InstanceType<This> | null
|
|
881
|
+
|
|
882
|
+
static descriptorWithTypeABC<This extends abstract new (...args: any) => any>(
|
|
883
|
+
this: This,
|
|
884
|
+
activationType: interop.Enum<typeof MLCActivationType>,
|
|
885
|
+
a: number,
|
|
886
|
+
b: number,
|
|
887
|
+
c: number,
|
|
888
|
+
): InstanceType<This> | null
|
|
889
|
+
|
|
890
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
declare class MLCInferenceGraph extends MLCGraph {
|
|
894
|
+
readonly deviceMemorySize: number
|
|
895
|
+
|
|
896
|
+
static graphWithGraphObjects<This extends abstract new (...args: any) => any>(
|
|
897
|
+
this: This,
|
|
898
|
+
graphObjects: NSArray<interop.Object> | Array<interop.Object>,
|
|
899
|
+
): InstanceType<This>
|
|
900
|
+
|
|
901
|
+
addInputs(
|
|
902
|
+
inputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
903
|
+
): boolean
|
|
904
|
+
|
|
905
|
+
addInputsLossLabelsLossLabelWeights(
|
|
906
|
+
inputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
907
|
+
lossLabels:
|
|
908
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
909
|
+
| Record<interop.Object, interop.Object>
|
|
910
|
+
| null,
|
|
911
|
+
lossLabelWeights:
|
|
912
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
913
|
+
| Record<interop.Object, interop.Object>
|
|
914
|
+
| null,
|
|
915
|
+
): boolean
|
|
916
|
+
|
|
917
|
+
addOutputs(
|
|
918
|
+
outputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
919
|
+
): boolean
|
|
920
|
+
|
|
921
|
+
compileWithOptionsDevice(
|
|
922
|
+
options: interop.Enum<typeof MLCGraphCompilationOptions>,
|
|
923
|
+
device: MLCDevice,
|
|
924
|
+
): boolean
|
|
925
|
+
|
|
926
|
+
linkWithGraphs(graphs: NSArray<interop.Object> | Array<interop.Object>): boolean
|
|
927
|
+
|
|
928
|
+
executeWithInputsDataBatchSizeOptionsCompletionHandler(
|
|
929
|
+
inputsData:
|
|
930
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
931
|
+
| Record<interop.Object, interop.Object>,
|
|
932
|
+
batchSize: number,
|
|
933
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
934
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
935
|
+
): boolean
|
|
936
|
+
|
|
937
|
+
executeWithInputsDataOutputsDataBatchSizeOptionsCompletionHandler(
|
|
938
|
+
inputsData:
|
|
939
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
940
|
+
| Record<interop.Object, interop.Object>,
|
|
941
|
+
outputsData:
|
|
942
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
943
|
+
| Record<interop.Object, interop.Object>
|
|
944
|
+
| null,
|
|
945
|
+
batchSize: number,
|
|
946
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
947
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
948
|
+
): boolean
|
|
949
|
+
|
|
950
|
+
executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler(
|
|
951
|
+
inputsData:
|
|
952
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
953
|
+
| Record<interop.Object, interop.Object>,
|
|
954
|
+
lossLabelsData:
|
|
955
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
956
|
+
| Record<interop.Object, interop.Object>
|
|
957
|
+
| null,
|
|
958
|
+
lossLabelWeightsData:
|
|
959
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
960
|
+
| Record<interop.Object, interop.Object>
|
|
961
|
+
| null,
|
|
962
|
+
batchSize: number,
|
|
963
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
964
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
965
|
+
): boolean
|
|
966
|
+
|
|
967
|
+
executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler(
|
|
968
|
+
inputsData:
|
|
969
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
970
|
+
| Record<interop.Object, interop.Object>,
|
|
971
|
+
lossLabelsData:
|
|
972
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
973
|
+
| Record<interop.Object, interop.Object>
|
|
974
|
+
| null,
|
|
975
|
+
lossLabelWeightsData:
|
|
976
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
977
|
+
| Record<interop.Object, interop.Object>
|
|
978
|
+
| null,
|
|
979
|
+
outputsData:
|
|
980
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
981
|
+
| Record<interop.Object, interop.Object>
|
|
982
|
+
| null,
|
|
983
|
+
batchSize: number,
|
|
984
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
985
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
986
|
+
): boolean
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
declare class MLCTensor extends NSObject implements NSCopying {
|
|
990
|
+
readonly tensorID: number
|
|
991
|
+
|
|
992
|
+
readonly descriptor: MLCTensorDescriptor
|
|
993
|
+
|
|
994
|
+
readonly data: NSData
|
|
995
|
+
|
|
996
|
+
label: string
|
|
997
|
+
|
|
998
|
+
readonly device: MLCDevice
|
|
999
|
+
|
|
1000
|
+
readonly optimizerData: NSArray
|
|
1001
|
+
|
|
1002
|
+
readonly optimizerDeviceData: NSArray
|
|
1003
|
+
|
|
1004
|
+
static tensorWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
1005
|
+
this: This,
|
|
1006
|
+
tensorDescriptor: MLCTensorDescriptor,
|
|
1007
|
+
): InstanceType<This>
|
|
1008
|
+
|
|
1009
|
+
static tensorWithDescriptorRandomInitializerType<This extends abstract new (...args: any) => any>(
|
|
1010
|
+
this: This,
|
|
1011
|
+
tensorDescriptor: MLCTensorDescriptor,
|
|
1012
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1013
|
+
): InstanceType<This>
|
|
1014
|
+
|
|
1015
|
+
static tensorWithDescriptorFillWithData<This extends abstract new (...args: any) => any>(
|
|
1016
|
+
this: This,
|
|
1017
|
+
tensorDescriptor: MLCTensorDescriptor,
|
|
1018
|
+
fillData: NSNumber,
|
|
1019
|
+
): InstanceType<This>
|
|
1020
|
+
|
|
1021
|
+
static tensorWithDescriptorData<This extends abstract new (...args: any) => any>(
|
|
1022
|
+
this: This,
|
|
1023
|
+
tensorDescriptor: MLCTensorDescriptor,
|
|
1024
|
+
data: MLCTensorData,
|
|
1025
|
+
): InstanceType<This>
|
|
1026
|
+
|
|
1027
|
+
static tensorWithShape<This extends abstract new (...args: any) => any>(
|
|
1028
|
+
this: This,
|
|
1029
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1030
|
+
): InstanceType<This>
|
|
1031
|
+
|
|
1032
|
+
static tensorWithShapeRandomInitializerType<This extends abstract new (...args: any) => any>(
|
|
1033
|
+
this: This,
|
|
1034
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1035
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1036
|
+
): InstanceType<This>
|
|
1037
|
+
|
|
1038
|
+
static tensorWithShapeRandomInitializerTypeDataType<
|
|
1039
|
+
This extends abstract new (...args: any) => any,
|
|
1040
|
+
>(
|
|
1041
|
+
this: This,
|
|
1042
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1043
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1044
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1045
|
+
): InstanceType<This>
|
|
1046
|
+
|
|
1047
|
+
static tensorWithShapeDataType<This extends abstract new (...args: any) => any>(
|
|
1048
|
+
this: This,
|
|
1049
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1050
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1051
|
+
): InstanceType<This>
|
|
1052
|
+
|
|
1053
|
+
static tensorWithShapeDataDataType<This extends abstract new (...args: any) => any>(
|
|
1054
|
+
this: This,
|
|
1055
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1056
|
+
data: MLCTensorData,
|
|
1057
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1058
|
+
): InstanceType<This>
|
|
1059
|
+
|
|
1060
|
+
static tensorWithShapeFillWithDataDataType<This extends abstract new (...args: any) => any>(
|
|
1061
|
+
this: This,
|
|
1062
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1063
|
+
fillData: NSNumber,
|
|
1064
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1065
|
+
): InstanceType<This>
|
|
1066
|
+
|
|
1067
|
+
static tensorWithWidthHeightFeatureChannelCountBatchSize<
|
|
1068
|
+
This extends abstract new (...args: any) => any,
|
|
1069
|
+
>(
|
|
1070
|
+
this: This,
|
|
1071
|
+
width: number,
|
|
1072
|
+
height: number,
|
|
1073
|
+
featureChannelCount: number,
|
|
1074
|
+
batchSize: number,
|
|
1075
|
+
): InstanceType<This>
|
|
1076
|
+
|
|
1077
|
+
static tensorWithWidthHeightFeatureChannelCountBatchSizeFillWithDataDataType<
|
|
1078
|
+
This extends abstract new (...args: any) => any,
|
|
1079
|
+
>(
|
|
1080
|
+
this: This,
|
|
1081
|
+
width: number,
|
|
1082
|
+
height: number,
|
|
1083
|
+
featureChannelCount: number,
|
|
1084
|
+
batchSize: number,
|
|
1085
|
+
fillData: number,
|
|
1086
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1087
|
+
): InstanceType<This>
|
|
1088
|
+
|
|
1089
|
+
static tensorWithWidthHeightFeatureChannelCountBatchSizeRandomInitializerType<
|
|
1090
|
+
This extends abstract new (...args: any) => any,
|
|
1091
|
+
>(
|
|
1092
|
+
this: This,
|
|
1093
|
+
width: number,
|
|
1094
|
+
height: number,
|
|
1095
|
+
featureChannelCount: number,
|
|
1096
|
+
batchSize: number,
|
|
1097
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1098
|
+
): InstanceType<This>
|
|
1099
|
+
|
|
1100
|
+
static tensorWithWidthHeightFeatureChannelCountBatchSizeData<
|
|
1101
|
+
This extends abstract new (...args: any) => any,
|
|
1102
|
+
>(
|
|
1103
|
+
this: This,
|
|
1104
|
+
width: number,
|
|
1105
|
+
height: number,
|
|
1106
|
+
featureChannelCount: number,
|
|
1107
|
+
batchSize: number,
|
|
1108
|
+
data: MLCTensorData,
|
|
1109
|
+
): InstanceType<This>
|
|
1110
|
+
|
|
1111
|
+
static tensorWithWidthHeightFeatureChannelCountBatchSizeDataDataType<
|
|
1112
|
+
This extends abstract new (...args: any) => any,
|
|
1113
|
+
>(
|
|
1114
|
+
this: This,
|
|
1115
|
+
width: number,
|
|
1116
|
+
height: number,
|
|
1117
|
+
featureChannelCount: number,
|
|
1118
|
+
batchSize: number,
|
|
1119
|
+
data: MLCTensorData,
|
|
1120
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1121
|
+
): InstanceType<This>
|
|
1122
|
+
|
|
1123
|
+
static tensorWithSequenceLengthFeatureChannelCountBatchSize<
|
|
1124
|
+
This extends abstract new (...args: any) => any,
|
|
1125
|
+
>(
|
|
1126
|
+
this: This,
|
|
1127
|
+
sequenceLength: number,
|
|
1128
|
+
featureChannelCount: number,
|
|
1129
|
+
batchSize: number,
|
|
1130
|
+
): InstanceType<This>
|
|
1131
|
+
|
|
1132
|
+
static tensorWithSequenceLengthFeatureChannelCountBatchSizeRandomInitializerType<
|
|
1133
|
+
This extends abstract new (...args: any) => any,
|
|
1134
|
+
>(
|
|
1135
|
+
this: This,
|
|
1136
|
+
sequenceLength: number,
|
|
1137
|
+
featureChannelCount: number,
|
|
1138
|
+
batchSize: number,
|
|
1139
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1140
|
+
): InstanceType<This>
|
|
1141
|
+
|
|
1142
|
+
static tensorWithSequenceLengthFeatureChannelCountBatchSizeData<
|
|
1143
|
+
This extends abstract new (...args: any) => any,
|
|
1144
|
+
>(
|
|
1145
|
+
this: This,
|
|
1146
|
+
sequenceLength: number,
|
|
1147
|
+
featureChannelCount: number,
|
|
1148
|
+
batchSize: number,
|
|
1149
|
+
data: MLCTensorData | null,
|
|
1150
|
+
): InstanceType<This>
|
|
1151
|
+
|
|
1152
|
+
static tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeRandomInitializerType<
|
|
1153
|
+
This extends abstract new (...args: any) => any,
|
|
1154
|
+
>(
|
|
1155
|
+
this: This,
|
|
1156
|
+
sequenceLengths: NSArray<interop.Object> | Array<interop.Object>,
|
|
1157
|
+
sortedSequences: boolean,
|
|
1158
|
+
featureChannelCount: number,
|
|
1159
|
+
batchSize: number,
|
|
1160
|
+
randomInitializerType: interop.Enum<typeof MLCRandomInitializerType>,
|
|
1161
|
+
): InstanceType<This> | null
|
|
1162
|
+
|
|
1163
|
+
static tensorWithSequenceLengthsSortedSequencesFeatureChannelCountBatchSizeData<
|
|
1164
|
+
This extends abstract new (...args: any) => any,
|
|
1165
|
+
>(
|
|
1166
|
+
this: This,
|
|
1167
|
+
sequenceLengths: NSArray<interop.Object> | Array<interop.Object>,
|
|
1168
|
+
sortedSequences: boolean,
|
|
1169
|
+
featureChannelCount: number,
|
|
1170
|
+
batchSize: number,
|
|
1171
|
+
data: MLCTensorData | null,
|
|
1172
|
+
): InstanceType<This> | null
|
|
1173
|
+
|
|
1174
|
+
readonly hasValidNumerics: boolean
|
|
1175
|
+
|
|
1176
|
+
synchronizeData(): boolean
|
|
1177
|
+
|
|
1178
|
+
synchronizeOptimizerData(): boolean
|
|
1179
|
+
|
|
1180
|
+
copyDataFromDeviceMemoryToBytesLengthSynchronizeWithDevice(
|
|
1181
|
+
bytes: interop.PointerConvertible,
|
|
1182
|
+
length: number,
|
|
1183
|
+
synchronizeWithDevice: boolean,
|
|
1184
|
+
): boolean
|
|
1185
|
+
|
|
1186
|
+
bindAndWriteDataToDevice(data: MLCTensorData, device: MLCDevice): boolean
|
|
1187
|
+
|
|
1188
|
+
bindOptimizerDataDeviceData(
|
|
1189
|
+
data: NSArray<interop.Object> | Array<interop.Object>,
|
|
1190
|
+
deviceData: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1191
|
+
): boolean
|
|
1192
|
+
|
|
1193
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
declare class MLCDevice extends NSObject implements NSCopying {
|
|
1197
|
+
readonly type: interop.Enum<typeof MLCDeviceType>
|
|
1198
|
+
|
|
1199
|
+
readonly gpuDevices: NSArray
|
|
1200
|
+
|
|
1201
|
+
static cpuDevice<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>
|
|
1202
|
+
|
|
1203
|
+
static gpuDevice<This extends abstract new (...args: any) => any>(
|
|
1204
|
+
this: This,
|
|
1205
|
+
): InstanceType<This> | null
|
|
1206
|
+
|
|
1207
|
+
static deviceWithType<This extends abstract new (...args: any) => any>(
|
|
1208
|
+
this: This,
|
|
1209
|
+
type: interop.Enum<typeof MLCDeviceType>,
|
|
1210
|
+
): InstanceType<This> | null
|
|
1211
|
+
|
|
1212
|
+
static deviceWithGPUDevices<This extends abstract new (...args: any) => any>(
|
|
1213
|
+
this: This,
|
|
1214
|
+
gpus: NSArray<interop.Object> | Array<interop.Object>,
|
|
1215
|
+
): InstanceType<This> | null
|
|
1216
|
+
|
|
1217
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
declare class MLCPaddingLayer extends MLCLayer implements NSCopying {
|
|
1221
|
+
readonly paddingType: interop.Enum<typeof MLCPaddingType>
|
|
1222
|
+
|
|
1223
|
+
readonly paddingLeft: number
|
|
1224
|
+
|
|
1225
|
+
readonly paddingRight: number
|
|
1226
|
+
|
|
1227
|
+
readonly paddingTop: number
|
|
1228
|
+
|
|
1229
|
+
readonly paddingBottom: number
|
|
1230
|
+
|
|
1231
|
+
readonly constantValue: number
|
|
1232
|
+
|
|
1233
|
+
static layerWithReflectionPadding<This extends abstract new (...args: any) => any>(
|
|
1234
|
+
this: This,
|
|
1235
|
+
padding: NSArray<interop.Object> | Array<interop.Object>,
|
|
1236
|
+
): InstanceType<This>
|
|
1237
|
+
|
|
1238
|
+
static layerWithSymmetricPadding<This extends abstract new (...args: any) => any>(
|
|
1239
|
+
this: This,
|
|
1240
|
+
padding: NSArray<interop.Object> | Array<interop.Object>,
|
|
1241
|
+
): InstanceType<This>
|
|
1242
|
+
|
|
1243
|
+
static layerWithZeroPadding<This extends abstract new (...args: any) => any>(
|
|
1244
|
+
this: This,
|
|
1245
|
+
padding: NSArray<interop.Object> | Array<interop.Object>,
|
|
1246
|
+
): InstanceType<This>
|
|
1247
|
+
|
|
1248
|
+
static layerWithConstantPaddingConstantValue<This extends abstract new (...args: any) => any>(
|
|
1249
|
+
this: This,
|
|
1250
|
+
padding: NSArray<interop.Object> | Array<interop.Object>,
|
|
1251
|
+
constantValue: number,
|
|
1252
|
+
): InstanceType<This>
|
|
1253
|
+
|
|
1254
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
declare class MLCTrainingGraph extends MLCGraph {
|
|
1258
|
+
readonly optimizer: MLCOptimizer
|
|
1259
|
+
|
|
1260
|
+
readonly deviceMemorySize: number
|
|
1261
|
+
|
|
1262
|
+
static graphWithGraphObjectsLossLayerOptimizer<This extends abstract new (...args: any) => any>(
|
|
1263
|
+
this: This,
|
|
1264
|
+
graphObjects: NSArray<interop.Object> | Array<interop.Object>,
|
|
1265
|
+
lossLayer: MLCLayer | null,
|
|
1266
|
+
optimizer: MLCOptimizer | null,
|
|
1267
|
+
): InstanceType<This>
|
|
1268
|
+
|
|
1269
|
+
addInputsLossLabels(
|
|
1270
|
+
inputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
1271
|
+
lossLabels:
|
|
1272
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1273
|
+
| Record<interop.Object, interop.Object>
|
|
1274
|
+
| null,
|
|
1275
|
+
): boolean
|
|
1276
|
+
|
|
1277
|
+
addInputsLossLabelsLossLabelWeights(
|
|
1278
|
+
inputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
1279
|
+
lossLabels:
|
|
1280
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1281
|
+
| Record<interop.Object, interop.Object>
|
|
1282
|
+
| null,
|
|
1283
|
+
lossLabelWeights:
|
|
1284
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1285
|
+
| Record<interop.Object, interop.Object>
|
|
1286
|
+
| null,
|
|
1287
|
+
): boolean
|
|
1288
|
+
|
|
1289
|
+
addOutputs(
|
|
1290
|
+
outputs: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>,
|
|
1291
|
+
): boolean
|
|
1292
|
+
|
|
1293
|
+
stopGradientForTensors(tensors: NSArray<interop.Object> | Array<interop.Object>): boolean
|
|
1294
|
+
|
|
1295
|
+
compileWithOptionsDevice(
|
|
1296
|
+
options: interop.Enum<typeof MLCGraphCompilationOptions>,
|
|
1297
|
+
device: MLCDevice,
|
|
1298
|
+
): boolean
|
|
1299
|
+
|
|
1300
|
+
compileOptimizer(optimizer: MLCOptimizer): boolean
|
|
1301
|
+
|
|
1302
|
+
linkWithGraphs(graphs: NSArray<interop.Object> | Array<interop.Object>): boolean
|
|
1303
|
+
|
|
1304
|
+
gradientTensorForInput(input: MLCTensor): MLCTensor | null
|
|
1305
|
+
|
|
1306
|
+
sourceGradientTensorsForLayer(layer: MLCLayer): NSArray
|
|
1307
|
+
|
|
1308
|
+
resultGradientTensorsForLayer(layer: MLCLayer): NSArray
|
|
1309
|
+
|
|
1310
|
+
gradientDataForParameterLayer(parameter: MLCTensor, layer: MLCLayer): NSData | null
|
|
1311
|
+
|
|
1312
|
+
allocateUserGradientForTensor(tensor: MLCTensor): MLCTensor | null
|
|
1313
|
+
|
|
1314
|
+
executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler(
|
|
1315
|
+
inputsData:
|
|
1316
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1317
|
+
| Record<interop.Object, interop.Object>,
|
|
1318
|
+
lossLabelsData:
|
|
1319
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1320
|
+
| Record<interop.Object, interop.Object>
|
|
1321
|
+
| null,
|
|
1322
|
+
lossLabelWeightsData:
|
|
1323
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1324
|
+
| Record<interop.Object, interop.Object>
|
|
1325
|
+
| null,
|
|
1326
|
+
batchSize: number,
|
|
1327
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1328
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1329
|
+
): boolean
|
|
1330
|
+
|
|
1331
|
+
executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler(
|
|
1332
|
+
inputsData:
|
|
1333
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1334
|
+
| Record<interop.Object, interop.Object>,
|
|
1335
|
+
lossLabelsData:
|
|
1336
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1337
|
+
| Record<interop.Object, interop.Object>
|
|
1338
|
+
| null,
|
|
1339
|
+
lossLabelWeightsData:
|
|
1340
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1341
|
+
| Record<interop.Object, interop.Object>
|
|
1342
|
+
| null,
|
|
1343
|
+
outputsData:
|
|
1344
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1345
|
+
| Record<interop.Object, interop.Object>
|
|
1346
|
+
| null,
|
|
1347
|
+
batchSize: number,
|
|
1348
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1349
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1350
|
+
): boolean
|
|
1351
|
+
|
|
1352
|
+
executeForwardWithBatchSizeOptionsCompletionHandler(
|
|
1353
|
+
batchSize: number,
|
|
1354
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1355
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1356
|
+
): boolean
|
|
1357
|
+
|
|
1358
|
+
executeForwardWithBatchSizeOptionsOutputsDataCompletionHandler(
|
|
1359
|
+
batchSize: number,
|
|
1360
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1361
|
+
outputsData:
|
|
1362
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1363
|
+
| Record<interop.Object, interop.Object>
|
|
1364
|
+
| null,
|
|
1365
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1366
|
+
): boolean
|
|
1367
|
+
|
|
1368
|
+
executeGradientWithBatchSizeOptionsCompletionHandler(
|
|
1369
|
+
batchSize: number,
|
|
1370
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1371
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1372
|
+
): boolean
|
|
1373
|
+
|
|
1374
|
+
executeGradientWithBatchSizeOptionsOutputsDataCompletionHandler(
|
|
1375
|
+
batchSize: number,
|
|
1376
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1377
|
+
outputsData:
|
|
1378
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
1379
|
+
| Record<interop.Object, interop.Object>
|
|
1380
|
+
| null,
|
|
1381
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1382
|
+
): boolean
|
|
1383
|
+
|
|
1384
|
+
executeOptimizerUpdateWithOptionsCompletionHandler(
|
|
1385
|
+
options: interop.Enum<typeof MLCExecutionOptions>,
|
|
1386
|
+
completionHandler: (p1: MLCTensor, p2: NSError, p3: number) => void | null,
|
|
1387
|
+
): boolean
|
|
1388
|
+
|
|
1389
|
+
synchronizeUpdates(): void
|
|
1390
|
+
|
|
1391
|
+
setTrainingTensorParameters(parameters: NSArray<interop.Object> | Array<interop.Object>): boolean
|
|
1392
|
+
|
|
1393
|
+
bindOptimizerDataDeviceDataWithTensor(
|
|
1394
|
+
data: NSArray<interop.Object> | Array<interop.Object>,
|
|
1395
|
+
deviceData: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1396
|
+
tensor: MLCTensor,
|
|
1397
|
+
): boolean
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
declare class MLCConvolutionLayer extends MLCLayer {
|
|
1401
|
+
readonly descriptor: MLCConvolutionDescriptor
|
|
1402
|
+
|
|
1403
|
+
readonly weights: MLCTensor
|
|
1404
|
+
|
|
1405
|
+
readonly biases: MLCTensor
|
|
1406
|
+
|
|
1407
|
+
readonly weightsParameter: MLCTensorParameter
|
|
1408
|
+
|
|
1409
|
+
readonly biasesParameter: MLCTensorParameter
|
|
1410
|
+
|
|
1411
|
+
static layerWithWeightsBiasesDescriptor<This extends abstract new (...args: any) => any>(
|
|
1412
|
+
this: This,
|
|
1413
|
+
weights: MLCTensor,
|
|
1414
|
+
biases: MLCTensor | null,
|
|
1415
|
+
descriptor: MLCConvolutionDescriptor,
|
|
1416
|
+
): InstanceType<This> | null
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
declare class MLCYOLOLossLayer extends MLCLossLayer {
|
|
1420
|
+
readonly yoloLossDescriptor: MLCYOLOLossDescriptor
|
|
1421
|
+
|
|
1422
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
1423
|
+
this: This,
|
|
1424
|
+
lossDescriptor: MLCLossDescriptor,
|
|
1425
|
+
): InstanceType<This>
|
|
1426
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
1427
|
+
this: This,
|
|
1428
|
+
lossDescriptor: MLCYOLOLossDescriptor,
|
|
1429
|
+
): InstanceType<This>
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
declare class MLCReshapeLayer extends MLCLayer {
|
|
1433
|
+
static layerWithShape<This extends abstract new (...args: any) => any>(
|
|
1434
|
+
this: This,
|
|
1435
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1436
|
+
): InstanceType<This> | null
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
declare class MLCLossLayer extends MLCLayer {
|
|
1440
|
+
readonly descriptor: MLCLossDescriptor
|
|
1441
|
+
|
|
1442
|
+
readonly weights: MLCTensor
|
|
1443
|
+
|
|
1444
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
1445
|
+
this: This,
|
|
1446
|
+
lossDescriptor: MLCLossDescriptor,
|
|
1447
|
+
): InstanceType<This>
|
|
1448
|
+
|
|
1449
|
+
static layerWithDescriptorWeights<This extends abstract new (...args: any) => any>(
|
|
1450
|
+
this: This,
|
|
1451
|
+
lossDescriptor: MLCLossDescriptor,
|
|
1452
|
+
weights: MLCTensor,
|
|
1453
|
+
): InstanceType<This>
|
|
1454
|
+
|
|
1455
|
+
static softmaxCrossEntropyLossWithReductionTypeLabelSmoothingClassCountWeight<
|
|
1456
|
+
This extends abstract new (...args: any) => any,
|
|
1457
|
+
>(
|
|
1458
|
+
this: This,
|
|
1459
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1460
|
+
labelSmoothing: number,
|
|
1461
|
+
classCount: number,
|
|
1462
|
+
weight: number,
|
|
1463
|
+
): InstanceType<This>
|
|
1464
|
+
|
|
1465
|
+
static softmaxCrossEntropyLossWithReductionTypeLabelSmoothingClassCountWeights<
|
|
1466
|
+
This extends abstract new (...args: any) => any,
|
|
1467
|
+
>(
|
|
1468
|
+
this: This,
|
|
1469
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1470
|
+
labelSmoothing: number,
|
|
1471
|
+
classCount: number,
|
|
1472
|
+
weights: MLCTensor | null,
|
|
1473
|
+
): InstanceType<This>
|
|
1474
|
+
|
|
1475
|
+
static categoricalCrossEntropyLossWithReductionTypeLabelSmoothingClassCountWeight<
|
|
1476
|
+
This extends abstract new (...args: any) => any,
|
|
1477
|
+
>(
|
|
1478
|
+
this: This,
|
|
1479
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1480
|
+
labelSmoothing: number,
|
|
1481
|
+
classCount: number,
|
|
1482
|
+
weight: number,
|
|
1483
|
+
): InstanceType<This>
|
|
1484
|
+
|
|
1485
|
+
static categoricalCrossEntropyLossWithReductionTypeLabelSmoothingClassCountWeights<
|
|
1486
|
+
This extends abstract new (...args: any) => any,
|
|
1487
|
+
>(
|
|
1488
|
+
this: This,
|
|
1489
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1490
|
+
labelSmoothing: number,
|
|
1491
|
+
classCount: number,
|
|
1492
|
+
weights: MLCTensor | null,
|
|
1493
|
+
): InstanceType<This>
|
|
1494
|
+
|
|
1495
|
+
static sigmoidCrossEntropyLossWithReductionTypeLabelSmoothingWeight<
|
|
1496
|
+
This extends abstract new (...args: any) => any,
|
|
1497
|
+
>(
|
|
1498
|
+
this: This,
|
|
1499
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1500
|
+
labelSmoothing: number,
|
|
1501
|
+
weight: number,
|
|
1502
|
+
): InstanceType<This>
|
|
1503
|
+
|
|
1504
|
+
static sigmoidCrossEntropyLossWithReductionTypeLabelSmoothingWeights<
|
|
1505
|
+
This extends abstract new (...args: any) => any,
|
|
1506
|
+
>(
|
|
1507
|
+
this: This,
|
|
1508
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1509
|
+
labelSmoothing: number,
|
|
1510
|
+
weights: MLCTensor | null,
|
|
1511
|
+
): InstanceType<This>
|
|
1512
|
+
|
|
1513
|
+
static logLossWithReductionTypeEpsilonWeight<This extends abstract new (...args: any) => any>(
|
|
1514
|
+
this: This,
|
|
1515
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1516
|
+
epsilon: number,
|
|
1517
|
+
weight: number,
|
|
1518
|
+
): InstanceType<This>
|
|
1519
|
+
|
|
1520
|
+
static logLossWithReductionTypeEpsilonWeights<This extends abstract new (...args: any) => any>(
|
|
1521
|
+
this: This,
|
|
1522
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1523
|
+
epsilon: number,
|
|
1524
|
+
weights: MLCTensor | null,
|
|
1525
|
+
): InstanceType<This>
|
|
1526
|
+
|
|
1527
|
+
static huberLossWithReductionTypeDeltaWeight<This extends abstract new (...args: any) => any>(
|
|
1528
|
+
this: This,
|
|
1529
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1530
|
+
delta: number,
|
|
1531
|
+
weight: number,
|
|
1532
|
+
): InstanceType<This>
|
|
1533
|
+
|
|
1534
|
+
static huberLossWithReductionTypeDeltaWeights<This extends abstract new (...args: any) => any>(
|
|
1535
|
+
this: This,
|
|
1536
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1537
|
+
delta: number,
|
|
1538
|
+
weights: MLCTensor | null,
|
|
1539
|
+
): InstanceType<This>
|
|
1540
|
+
|
|
1541
|
+
static meanAbsoluteErrorLossWithReductionTypeWeight<
|
|
1542
|
+
This extends abstract new (...args: any) => any,
|
|
1543
|
+
>(
|
|
1544
|
+
this: This,
|
|
1545
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1546
|
+
weight: number,
|
|
1547
|
+
): InstanceType<This>
|
|
1548
|
+
|
|
1549
|
+
static meanAbsoluteErrorLossWithReductionTypeWeights<
|
|
1550
|
+
This extends abstract new (...args: any) => any,
|
|
1551
|
+
>(
|
|
1552
|
+
this: This,
|
|
1553
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1554
|
+
weights: MLCTensor | null,
|
|
1555
|
+
): InstanceType<This>
|
|
1556
|
+
|
|
1557
|
+
static meanSquaredErrorLossWithReductionTypeWeight<
|
|
1558
|
+
This extends abstract new (...args: any) => any,
|
|
1559
|
+
>(
|
|
1560
|
+
this: This,
|
|
1561
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1562
|
+
weight: number,
|
|
1563
|
+
): InstanceType<This>
|
|
1564
|
+
|
|
1565
|
+
static meanSquaredErrorLossWithReductionTypeWeights<
|
|
1566
|
+
This extends abstract new (...args: any) => any,
|
|
1567
|
+
>(
|
|
1568
|
+
this: This,
|
|
1569
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1570
|
+
weights: MLCTensor | null,
|
|
1571
|
+
): InstanceType<This>
|
|
1572
|
+
|
|
1573
|
+
static hingeLossWithReductionTypeWeight<This extends abstract new (...args: any) => any>(
|
|
1574
|
+
this: This,
|
|
1575
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1576
|
+
weight: number,
|
|
1577
|
+
): InstanceType<This>
|
|
1578
|
+
|
|
1579
|
+
static hingeLossWithReductionTypeWeights<This extends abstract new (...args: any) => any>(
|
|
1580
|
+
this: This,
|
|
1581
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1582
|
+
weights: MLCTensor | null,
|
|
1583
|
+
): InstanceType<This>
|
|
1584
|
+
|
|
1585
|
+
static cosineDistanceLossWithReductionTypeWeight<This extends abstract new (...args: any) => any>(
|
|
1586
|
+
this: This,
|
|
1587
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1588
|
+
weight: number,
|
|
1589
|
+
): InstanceType<This>
|
|
1590
|
+
|
|
1591
|
+
static cosineDistanceLossWithReductionTypeWeights<
|
|
1592
|
+
This extends abstract new (...args: any) => any,
|
|
1593
|
+
>(
|
|
1594
|
+
this: This,
|
|
1595
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
1596
|
+
weights: MLCTensor | null,
|
|
1597
|
+
): InstanceType<This>
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
declare class MLCFullyConnectedLayer extends MLCLayer {
|
|
1601
|
+
readonly descriptor: MLCConvolutionDescriptor
|
|
1602
|
+
|
|
1603
|
+
readonly weights: MLCTensor
|
|
1604
|
+
|
|
1605
|
+
readonly biases: MLCTensor
|
|
1606
|
+
|
|
1607
|
+
readonly weightsParameter: MLCTensorParameter
|
|
1608
|
+
|
|
1609
|
+
readonly biasesParameter: MLCTensorParameter
|
|
1610
|
+
|
|
1611
|
+
static layerWithWeightsBiasesDescriptor<This extends abstract new (...args: any) => any>(
|
|
1612
|
+
this: This,
|
|
1613
|
+
weights: MLCTensor,
|
|
1614
|
+
biases: MLCTensor | null,
|
|
1615
|
+
descriptor: MLCConvolutionDescriptor,
|
|
1616
|
+
): InstanceType<This> | null
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
declare class MLCTensorOptimizerDeviceData extends NSObject implements NSCopying {
|
|
1620
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
declare class MLCEmbeddingDescriptor extends NSObject implements NSCopying {
|
|
1624
|
+
readonly embeddingCount: NSNumber
|
|
1625
|
+
|
|
1626
|
+
readonly embeddingDimension: NSNumber
|
|
1627
|
+
|
|
1628
|
+
readonly paddingIndex: NSNumber
|
|
1629
|
+
|
|
1630
|
+
readonly maximumNorm: NSNumber
|
|
1631
|
+
|
|
1632
|
+
readonly pNorm: NSNumber
|
|
1633
|
+
|
|
1634
|
+
readonly scalesGradientByFrequency: boolean
|
|
1635
|
+
|
|
1636
|
+
static descriptorWithEmbeddingCountEmbeddingDimension<
|
|
1637
|
+
This extends abstract new (...args: any) => any,
|
|
1638
|
+
>(this: This, embeddingCount: NSNumber, embeddingDimension: NSNumber): InstanceType<This> | null
|
|
1639
|
+
|
|
1640
|
+
static descriptorWithEmbeddingCountEmbeddingDimensionPaddingIndexMaximumNormPNormScalesGradientByFrequency<
|
|
1641
|
+
This extends abstract new (...args: any) => any,
|
|
1642
|
+
>(
|
|
1643
|
+
this: This,
|
|
1644
|
+
embeddingCount: NSNumber,
|
|
1645
|
+
embeddingDimension: NSNumber,
|
|
1646
|
+
paddingIndex: NSNumber | null,
|
|
1647
|
+
maximumNorm: NSNumber | null,
|
|
1648
|
+
pNorm: NSNumber | null,
|
|
1649
|
+
scalesGradientByFrequency: boolean,
|
|
1650
|
+
): InstanceType<This> | null
|
|
1651
|
+
|
|
1652
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
declare class MLCGramMatrixLayer extends MLCLayer {
|
|
1656
|
+
readonly scale: number
|
|
1657
|
+
|
|
1658
|
+
static layerWithScale<This extends abstract new (...args: any) => any>(
|
|
1659
|
+
this: This,
|
|
1660
|
+
scale: number,
|
|
1661
|
+
): InstanceType<This>
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
declare class MLCMultiheadAttentionLayer extends MLCLayer {
|
|
1665
|
+
readonly descriptor: MLCMultiheadAttentionDescriptor
|
|
1666
|
+
|
|
1667
|
+
readonly weights: NSArray
|
|
1668
|
+
|
|
1669
|
+
readonly biases: NSArray
|
|
1670
|
+
|
|
1671
|
+
readonly attentionBiases: NSArray
|
|
1672
|
+
|
|
1673
|
+
readonly weightsParameters: NSArray
|
|
1674
|
+
|
|
1675
|
+
readonly biasesParameters: NSArray
|
|
1676
|
+
|
|
1677
|
+
static layerWithDescriptorWeightsBiasesAttentionBiases<
|
|
1678
|
+
This extends abstract new (...args: any) => any,
|
|
1679
|
+
>(
|
|
1680
|
+
this: This,
|
|
1681
|
+
descriptor: MLCMultiheadAttentionDescriptor,
|
|
1682
|
+
weights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1683
|
+
biases: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1684
|
+
attentionBiases: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1685
|
+
): InstanceType<This> | null
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
declare class MLCMatMulLayer extends MLCLayer {
|
|
1689
|
+
readonly descriptor: MLCMatMulDescriptor
|
|
1690
|
+
|
|
1691
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
1692
|
+
this: This,
|
|
1693
|
+
descriptor: MLCMatMulDescriptor,
|
|
1694
|
+
): InstanceType<This> | null
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
declare class MLCLSTMLayer extends MLCLayer {
|
|
1698
|
+
readonly descriptor: MLCLSTMDescriptor
|
|
1699
|
+
|
|
1700
|
+
readonly gateActivations: NSArray
|
|
1701
|
+
|
|
1702
|
+
readonly outputResultActivation: MLCActivationDescriptor
|
|
1703
|
+
|
|
1704
|
+
readonly inputWeights: NSArray
|
|
1705
|
+
|
|
1706
|
+
readonly hiddenWeights: NSArray
|
|
1707
|
+
|
|
1708
|
+
readonly peepholeWeights: NSArray
|
|
1709
|
+
|
|
1710
|
+
readonly biases: NSArray
|
|
1711
|
+
|
|
1712
|
+
readonly inputWeightsParameters: NSArray
|
|
1713
|
+
|
|
1714
|
+
readonly hiddenWeightsParameters: NSArray
|
|
1715
|
+
|
|
1716
|
+
readonly peepholeWeightsParameters: NSArray
|
|
1717
|
+
|
|
1718
|
+
readonly biasesParameters: NSArray
|
|
1719
|
+
|
|
1720
|
+
static layerWithDescriptorInputWeightsHiddenWeightsBiases<
|
|
1721
|
+
This extends abstract new (...args: any) => any,
|
|
1722
|
+
>(
|
|
1723
|
+
this: This,
|
|
1724
|
+
descriptor: MLCLSTMDescriptor,
|
|
1725
|
+
inputWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1726
|
+
hiddenWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1727
|
+
biases: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1728
|
+
): InstanceType<This> | null
|
|
1729
|
+
|
|
1730
|
+
static layerWithDescriptorInputWeightsHiddenWeightsPeepholeWeightsBiases<
|
|
1731
|
+
This extends abstract new (...args: any) => any,
|
|
1732
|
+
>(
|
|
1733
|
+
this: This,
|
|
1734
|
+
descriptor: MLCLSTMDescriptor,
|
|
1735
|
+
inputWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1736
|
+
hiddenWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1737
|
+
peepholeWeights: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1738
|
+
biases: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1739
|
+
): InstanceType<This> | null
|
|
1740
|
+
|
|
1741
|
+
static layerWithDescriptorInputWeightsHiddenWeightsPeepholeWeightsBiasesGateActivationsOutputResultActivation<
|
|
1742
|
+
This extends abstract new (...args: any) => any,
|
|
1743
|
+
>(
|
|
1744
|
+
this: This,
|
|
1745
|
+
descriptor: MLCLSTMDescriptor,
|
|
1746
|
+
inputWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1747
|
+
hiddenWeights: NSArray<interop.Object> | Array<interop.Object>,
|
|
1748
|
+
peepholeWeights: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1749
|
+
biases: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1750
|
+
gateActivations: NSArray<interop.Object> | Array<interop.Object>,
|
|
1751
|
+
outputResultActivation: MLCActivationDescriptor,
|
|
1752
|
+
): InstanceType<This> | null
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
declare class MLCUpsampleLayer extends MLCLayer {
|
|
1756
|
+
readonly shape: NSArray
|
|
1757
|
+
|
|
1758
|
+
readonly sampleMode: interop.Enum<typeof MLCSampleMode>
|
|
1759
|
+
|
|
1760
|
+
readonly alignsCorners: boolean
|
|
1761
|
+
|
|
1762
|
+
static layerWithShape<This extends abstract new (...args: any) => any>(
|
|
1763
|
+
this: This,
|
|
1764
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1765
|
+
): InstanceType<This> | null
|
|
1766
|
+
|
|
1767
|
+
static layerWithShapeSampleModeAlignsCorners<This extends abstract new (...args: any) => any>(
|
|
1768
|
+
this: This,
|
|
1769
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
1770
|
+
sampleMode: interop.Enum<typeof MLCSampleMode>,
|
|
1771
|
+
alignsCorners: boolean,
|
|
1772
|
+
): InstanceType<This> | null
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
declare class MLCConvolutionDescriptor extends NSObject implements NSCopying {
|
|
1776
|
+
readonly convolutionType: interop.Enum<typeof MLCConvolutionType>
|
|
1777
|
+
|
|
1778
|
+
readonly kernelWidth: number
|
|
1779
|
+
|
|
1780
|
+
readonly kernelHeight: number
|
|
1781
|
+
|
|
1782
|
+
readonly inputFeatureChannelCount: number
|
|
1783
|
+
|
|
1784
|
+
readonly outputFeatureChannelCount: number
|
|
1785
|
+
|
|
1786
|
+
readonly strideInX: number
|
|
1787
|
+
|
|
1788
|
+
readonly strideInY: number
|
|
1789
|
+
|
|
1790
|
+
readonly dilationRateInX: number
|
|
1791
|
+
|
|
1792
|
+
readonly dilationRateInY: number
|
|
1793
|
+
|
|
1794
|
+
readonly groupCount: number
|
|
1795
|
+
|
|
1796
|
+
readonly paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>
|
|
1797
|
+
|
|
1798
|
+
readonly paddingSizeInX: number
|
|
1799
|
+
|
|
1800
|
+
readonly paddingSizeInY: number
|
|
1801
|
+
|
|
1802
|
+
readonly isConvolutionTranspose: boolean
|
|
1803
|
+
|
|
1804
|
+
readonly usesDepthwiseConvolution: boolean
|
|
1805
|
+
|
|
1806
|
+
static descriptorWithTypeKernelSizesInputFeatureChannelCountOutputFeatureChannelCountGroupCountStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
1807
|
+
This extends abstract new (...args: any) => any,
|
|
1808
|
+
>(
|
|
1809
|
+
this: This,
|
|
1810
|
+
convolutionType: interop.Enum<typeof MLCConvolutionType>,
|
|
1811
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1812
|
+
inputFeatureChannelCount: number,
|
|
1813
|
+
outputFeatureChannelCount: number,
|
|
1814
|
+
groupCount: number,
|
|
1815
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1816
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
1817
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1818
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1819
|
+
): InstanceType<This>
|
|
1820
|
+
|
|
1821
|
+
static descriptorWithKernelWidthKernelHeightInputFeatureChannelCountOutputFeatureChannelCount<
|
|
1822
|
+
This extends abstract new (...args: any) => any,
|
|
1823
|
+
>(
|
|
1824
|
+
this: This,
|
|
1825
|
+
kernelWidth: number,
|
|
1826
|
+
kernelHeight: number,
|
|
1827
|
+
inputFeatureChannelCount: number,
|
|
1828
|
+
outputFeatureChannelCount: number,
|
|
1829
|
+
): InstanceType<This>
|
|
1830
|
+
|
|
1831
|
+
static descriptorWithKernelSizesInputFeatureChannelCountOutputFeatureChannelCountStridesPaddingPolicyPaddingSizes<
|
|
1832
|
+
This extends abstract new (...args: any) => any,
|
|
1833
|
+
>(
|
|
1834
|
+
this: This,
|
|
1835
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1836
|
+
inputFeatureChannelCount: number,
|
|
1837
|
+
outputFeatureChannelCount: number,
|
|
1838
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1839
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1840
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1841
|
+
): InstanceType<This>
|
|
1842
|
+
|
|
1843
|
+
static descriptorWithKernelSizesInputFeatureChannelCountOutputFeatureChannelCountGroupCountStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
1844
|
+
This extends abstract new (...args: any) => any,
|
|
1845
|
+
>(
|
|
1846
|
+
this: This,
|
|
1847
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1848
|
+
inputFeatureChannelCount: number,
|
|
1849
|
+
outputFeatureChannelCount: number,
|
|
1850
|
+
groupCount: number,
|
|
1851
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1852
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
1853
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1854
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1855
|
+
): InstanceType<This>
|
|
1856
|
+
|
|
1857
|
+
static convolutionTransposeDescriptorWithKernelWidthKernelHeightInputFeatureChannelCountOutputFeatureChannelCount<
|
|
1858
|
+
This extends abstract new (...args: any) => any,
|
|
1859
|
+
>(
|
|
1860
|
+
this: This,
|
|
1861
|
+
kernelWidth: number,
|
|
1862
|
+
kernelHeight: number,
|
|
1863
|
+
inputFeatureChannelCount: number,
|
|
1864
|
+
outputFeatureChannelCount: number,
|
|
1865
|
+
): InstanceType<This>
|
|
1866
|
+
|
|
1867
|
+
static convolutionTransposeDescriptorWithKernelSizesInputFeatureChannelCountOutputFeatureChannelCountStridesPaddingPolicyPaddingSizes<
|
|
1868
|
+
This extends abstract new (...args: any) => any,
|
|
1869
|
+
>(
|
|
1870
|
+
this: This,
|
|
1871
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1872
|
+
inputFeatureChannelCount: number,
|
|
1873
|
+
outputFeatureChannelCount: number,
|
|
1874
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1875
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1876
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1877
|
+
): InstanceType<This>
|
|
1878
|
+
|
|
1879
|
+
static convolutionTransposeDescriptorWithKernelSizesInputFeatureChannelCountOutputFeatureChannelCountGroupCountStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
1880
|
+
This extends abstract new (...args: any) => any,
|
|
1881
|
+
>(
|
|
1882
|
+
this: This,
|
|
1883
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1884
|
+
inputFeatureChannelCount: number,
|
|
1885
|
+
outputFeatureChannelCount: number,
|
|
1886
|
+
groupCount: number,
|
|
1887
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1888
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
1889
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1890
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1891
|
+
): InstanceType<This>
|
|
1892
|
+
|
|
1893
|
+
static depthwiseConvolutionDescriptorWithKernelWidthKernelHeightInputFeatureChannelCountChannelMultiplier<
|
|
1894
|
+
This extends abstract new (...args: any) => any,
|
|
1895
|
+
>(
|
|
1896
|
+
this: This,
|
|
1897
|
+
kernelWidth: number,
|
|
1898
|
+
kernelHeight: number,
|
|
1899
|
+
inputFeatureChannelCount: number,
|
|
1900
|
+
channelMultiplier: number,
|
|
1901
|
+
): InstanceType<This>
|
|
1902
|
+
|
|
1903
|
+
static depthwiseConvolutionDescriptorWithKernelSizesInputFeatureChannelCountChannelMultiplierStridesPaddingPolicyPaddingSizes<
|
|
1904
|
+
This extends abstract new (...args: any) => any,
|
|
1905
|
+
>(
|
|
1906
|
+
this: This,
|
|
1907
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1908
|
+
inputFeatureChannelCount: number,
|
|
1909
|
+
channelMultiplier: number,
|
|
1910
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1911
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1912
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1913
|
+
): InstanceType<This>
|
|
1914
|
+
|
|
1915
|
+
static depthwiseConvolutionDescriptorWithKernelSizesInputFeatureChannelCountChannelMultiplierStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
1916
|
+
This extends abstract new (...args: any) => any,
|
|
1917
|
+
>(
|
|
1918
|
+
this: This,
|
|
1919
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
1920
|
+
inputFeatureChannelCount: number,
|
|
1921
|
+
channelMultiplier: number,
|
|
1922
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
1923
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
1924
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
1925
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
1926
|
+
): InstanceType<This>
|
|
1927
|
+
|
|
1928
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
declare class MLCLayer extends NSObject {
|
|
1932
|
+
readonly layerID: number
|
|
1933
|
+
|
|
1934
|
+
label: string
|
|
1935
|
+
|
|
1936
|
+
isDebuggingEnabled: boolean
|
|
1937
|
+
|
|
1938
|
+
static supportsDataTypeOnDevice(
|
|
1939
|
+
dataType: interop.Enum<typeof MLCDataType>,
|
|
1940
|
+
device: MLCDevice,
|
|
1941
|
+
): boolean
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
declare class MLCGroupNormalizationLayer extends MLCLayer {
|
|
1945
|
+
readonly featureChannelCount: number
|
|
1946
|
+
|
|
1947
|
+
readonly groupCount: number
|
|
1948
|
+
|
|
1949
|
+
readonly beta: MLCTensor
|
|
1950
|
+
|
|
1951
|
+
readonly gamma: MLCTensor
|
|
1952
|
+
|
|
1953
|
+
readonly betaParameter: MLCTensorParameter
|
|
1954
|
+
|
|
1955
|
+
readonly gammaParameter: MLCTensorParameter
|
|
1956
|
+
|
|
1957
|
+
readonly varianceEpsilon: number
|
|
1958
|
+
|
|
1959
|
+
static layerWithFeatureChannelCountGroupCountBetaGammaVarianceEpsilon<
|
|
1960
|
+
This extends abstract new (...args: any) => any,
|
|
1961
|
+
>(
|
|
1962
|
+
this: This,
|
|
1963
|
+
featureChannelCount: number,
|
|
1964
|
+
groupCount: number,
|
|
1965
|
+
beta: MLCTensor | null,
|
|
1966
|
+
gamma: MLCTensor | null,
|
|
1967
|
+
varianceEpsilon: number,
|
|
1968
|
+
): InstanceType<This> | null
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
declare class MLCTransposeLayer extends MLCLayer {
|
|
1972
|
+
readonly dimensions: NSArray
|
|
1973
|
+
|
|
1974
|
+
static layerWithDimensions<This extends abstract new (...args: any) => any>(
|
|
1975
|
+
this: This,
|
|
1976
|
+
dimensions: NSArray<interop.Object> | Array<interop.Object>,
|
|
1977
|
+
): InstanceType<This> | null
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
declare class MLCConcatenationLayer extends MLCLayer {
|
|
1981
|
+
readonly dimension: number
|
|
1982
|
+
|
|
1983
|
+
static layer<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>
|
|
1984
|
+
|
|
1985
|
+
static layerWithDimension<This extends abstract new (...args: any) => any>(
|
|
1986
|
+
this: This,
|
|
1987
|
+
dimension: number,
|
|
1988
|
+
): InstanceType<This>
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
declare class MLCArithmeticLayer extends MLCLayer {
|
|
1992
|
+
readonly operation: interop.Enum<typeof MLCArithmeticOperation>
|
|
1993
|
+
|
|
1994
|
+
static layerWithOperation<This extends abstract new (...args: any) => any>(
|
|
1995
|
+
this: This,
|
|
1996
|
+
operation: interop.Enum<typeof MLCArithmeticOperation>,
|
|
1997
|
+
): InstanceType<This>
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
declare class MLCGraph extends NSObject {
|
|
2001
|
+
readonly device: MLCDevice
|
|
2002
|
+
|
|
2003
|
+
readonly layers: NSArray
|
|
2004
|
+
|
|
2005
|
+
static graph<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>
|
|
2006
|
+
|
|
2007
|
+
readonly summarizedDOTDescription: string
|
|
2008
|
+
|
|
2009
|
+
nodeWithLayerSource(layer: MLCLayer, source: MLCTensor): MLCTensor | null
|
|
2010
|
+
|
|
2011
|
+
nodeWithLayerSources(
|
|
2012
|
+
layer: MLCLayer,
|
|
2013
|
+
sources: NSArray<interop.Object> | Array<interop.Object>,
|
|
2014
|
+
): MLCTensor | null
|
|
2015
|
+
|
|
2016
|
+
nodeWithLayerSourcesDisableUpdate(
|
|
2017
|
+
layer: MLCLayer,
|
|
2018
|
+
sources: NSArray<interop.Object> | Array<interop.Object>,
|
|
2019
|
+
disableUpdate: boolean,
|
|
2020
|
+
): MLCTensor | null
|
|
2021
|
+
|
|
2022
|
+
nodeWithLayerSourcesLossLabels(
|
|
2023
|
+
layer: MLCLayer,
|
|
2024
|
+
sources: NSArray<interop.Object> | Array<interop.Object>,
|
|
2025
|
+
lossLabels: NSArray<interop.Object> | Array<interop.Object>,
|
|
2026
|
+
): MLCTensor | null
|
|
2027
|
+
|
|
2028
|
+
splitWithSourceSplitCountDimension(
|
|
2029
|
+
source: MLCTensor,
|
|
2030
|
+
splitCount: number,
|
|
2031
|
+
dimension: number,
|
|
2032
|
+
): NSArray | null
|
|
2033
|
+
|
|
2034
|
+
splitWithSourceSplitSectionLengthsDimension(
|
|
2035
|
+
source: MLCTensor,
|
|
2036
|
+
splitSectionLengths: NSArray<interop.Object> | Array<interop.Object>,
|
|
2037
|
+
dimension: number,
|
|
2038
|
+
): NSArray | null
|
|
2039
|
+
|
|
2040
|
+
concatenateWithSourcesDimension(
|
|
2041
|
+
sources: NSArray<interop.Object> | Array<interop.Object>,
|
|
2042
|
+
dimension: number,
|
|
2043
|
+
): MLCTensor | null
|
|
2044
|
+
|
|
2045
|
+
reshapeWithShapeSource(
|
|
2046
|
+
shape: NSArray<interop.Object> | Array<interop.Object>,
|
|
2047
|
+
source: MLCTensor,
|
|
2048
|
+
): MLCTensor | null
|
|
2049
|
+
|
|
2050
|
+
transposeWithDimensionsSource(
|
|
2051
|
+
dimensions: NSArray<interop.Object> | Array<interop.Object>,
|
|
2052
|
+
source: MLCTensor,
|
|
2053
|
+
): MLCTensor | null
|
|
2054
|
+
|
|
2055
|
+
bindAndWriteDataForInputsToDeviceBatchSizeSynchronous(
|
|
2056
|
+
inputsData:
|
|
2057
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
2058
|
+
| Record<interop.Object, interop.Object>,
|
|
2059
|
+
inputTensors:
|
|
2060
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
2061
|
+
| Record<interop.Object, interop.Object>,
|
|
2062
|
+
device: MLCDevice,
|
|
2063
|
+
batchSize: number,
|
|
2064
|
+
synchronous: boolean,
|
|
2065
|
+
): boolean
|
|
2066
|
+
|
|
2067
|
+
bindAndWriteDataForInputsToDeviceSynchronous(
|
|
2068
|
+
inputsData:
|
|
2069
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
2070
|
+
| Record<interop.Object, interop.Object>,
|
|
2071
|
+
inputTensors:
|
|
2072
|
+
| NSDictionary<interop.Object, interop.Object>
|
|
2073
|
+
| Record<interop.Object, interop.Object>,
|
|
2074
|
+
device: MLCDevice,
|
|
2075
|
+
synchronous: boolean,
|
|
2076
|
+
): boolean
|
|
2077
|
+
|
|
2078
|
+
sourceTensorsForLayer(layer: MLCLayer): NSArray
|
|
2079
|
+
|
|
2080
|
+
resultTensorsForLayer(layer: MLCLayer): NSArray
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
declare class MLCRMSPropOptimizer extends MLCOptimizer implements NSCopying {
|
|
2084
|
+
readonly momentumScale: number
|
|
2085
|
+
|
|
2086
|
+
readonly alpha: number
|
|
2087
|
+
|
|
2088
|
+
readonly epsilon: number
|
|
2089
|
+
|
|
2090
|
+
readonly isCentered: boolean
|
|
2091
|
+
|
|
2092
|
+
static optimizerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
2093
|
+
this: This,
|
|
2094
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
2095
|
+
): InstanceType<This>
|
|
2096
|
+
|
|
2097
|
+
static optimizerWithDescriptorMomentumScaleAlphaEpsilonIsCentered<
|
|
2098
|
+
This extends abstract new (...args: any) => any,
|
|
2099
|
+
>(
|
|
2100
|
+
this: This,
|
|
2101
|
+
optimizerDescriptor: MLCOptimizerDescriptor,
|
|
2102
|
+
momentumScale: number,
|
|
2103
|
+
alpha: number,
|
|
2104
|
+
epsilon: number,
|
|
2105
|
+
isCentered: boolean,
|
|
2106
|
+
): InstanceType<This>
|
|
2107
|
+
|
|
2108
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
declare class MLCTensorParameter extends NSObject {
|
|
2112
|
+
readonly tensor: MLCTensor
|
|
2113
|
+
|
|
2114
|
+
isUpdatable: boolean
|
|
2115
|
+
|
|
2116
|
+
static parameterWithTensor<This extends abstract new (...args: any) => any>(
|
|
2117
|
+
this: This,
|
|
2118
|
+
tensor: MLCTensor,
|
|
2119
|
+
): InstanceType<This>
|
|
2120
|
+
|
|
2121
|
+
static parameterWithTensorOptimizerData<This extends abstract new (...args: any) => any>(
|
|
2122
|
+
this: This,
|
|
2123
|
+
tensor: MLCTensor,
|
|
2124
|
+
optimizerData: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2125
|
+
): InstanceType<This>
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
declare class MLCTensorData extends NSObject {
|
|
2129
|
+
readonly bytes: interop.Pointer
|
|
2130
|
+
|
|
2131
|
+
readonly length: number
|
|
2132
|
+
|
|
2133
|
+
static dataWithBytesNoCopyLength<This extends abstract new (...args: any) => any>(
|
|
2134
|
+
this: This,
|
|
2135
|
+
bytes: interop.PointerConvertible,
|
|
2136
|
+
length: number,
|
|
2137
|
+
): InstanceType<This>
|
|
2138
|
+
|
|
2139
|
+
static dataWithImmutableBytesNoCopyLength<This extends abstract new (...args: any) => any>(
|
|
2140
|
+
this: This,
|
|
2141
|
+
bytes: interop.PointerConvertible,
|
|
2142
|
+
length: number,
|
|
2143
|
+
): InstanceType<This>
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
declare class MLCMatMulDescriptor extends NSObject implements NSCopying {
|
|
2147
|
+
readonly alpha: number
|
|
2148
|
+
|
|
2149
|
+
readonly transposesX: boolean
|
|
2150
|
+
|
|
2151
|
+
readonly transposesY: boolean
|
|
2152
|
+
|
|
2153
|
+
static descriptorWithAlphaTransposesXTransposesY<This extends abstract new (...args: any) => any>(
|
|
2154
|
+
this: This,
|
|
2155
|
+
alpha: number,
|
|
2156
|
+
transposesX: boolean,
|
|
2157
|
+
transposesY: boolean,
|
|
2158
|
+
): InstanceType<This> | null
|
|
2159
|
+
|
|
2160
|
+
static descriptor<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>
|
|
2161
|
+
|
|
2162
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
declare class MLCLossDescriptor extends NSObject implements NSCopying {
|
|
2166
|
+
readonly lossType: interop.Enum<typeof MLCLossType>
|
|
2167
|
+
|
|
2168
|
+
readonly reductionType: interop.Enum<typeof MLCReductionType>
|
|
2169
|
+
|
|
2170
|
+
readonly weight: number
|
|
2171
|
+
|
|
2172
|
+
readonly labelSmoothing: number
|
|
2173
|
+
|
|
2174
|
+
readonly classCount: number
|
|
2175
|
+
|
|
2176
|
+
readonly epsilon: number
|
|
2177
|
+
|
|
2178
|
+
readonly delta: number
|
|
2179
|
+
|
|
2180
|
+
static descriptorWithTypeReductionType<This extends abstract new (...args: any) => any>(
|
|
2181
|
+
this: This,
|
|
2182
|
+
lossType: interop.Enum<typeof MLCLossType>,
|
|
2183
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
2184
|
+
): InstanceType<This>
|
|
2185
|
+
|
|
2186
|
+
static descriptorWithTypeReductionTypeWeight<This extends abstract new (...args: any) => any>(
|
|
2187
|
+
this: This,
|
|
2188
|
+
lossType: interop.Enum<typeof MLCLossType>,
|
|
2189
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
2190
|
+
weight: number,
|
|
2191
|
+
): InstanceType<This>
|
|
2192
|
+
|
|
2193
|
+
static descriptorWithTypeReductionTypeWeightLabelSmoothingClassCount<
|
|
2194
|
+
This extends abstract new (...args: any) => any,
|
|
2195
|
+
>(
|
|
2196
|
+
this: This,
|
|
2197
|
+
lossType: interop.Enum<typeof MLCLossType>,
|
|
2198
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
2199
|
+
weight: number,
|
|
2200
|
+
labelSmoothing: number,
|
|
2201
|
+
classCount: number,
|
|
2202
|
+
): InstanceType<This>
|
|
2203
|
+
|
|
2204
|
+
static descriptorWithTypeReductionTypeWeightLabelSmoothingClassCountEpsilonDelta<
|
|
2205
|
+
This extends abstract new (...args: any) => any,
|
|
2206
|
+
>(
|
|
2207
|
+
this: This,
|
|
2208
|
+
lossType: interop.Enum<typeof MLCLossType>,
|
|
2209
|
+
reductionType: interop.Enum<typeof MLCReductionType>,
|
|
2210
|
+
weight: number,
|
|
2211
|
+
labelSmoothing: number,
|
|
2212
|
+
classCount: number,
|
|
2213
|
+
epsilon: number,
|
|
2214
|
+
delta: number,
|
|
2215
|
+
): InstanceType<This>
|
|
2216
|
+
|
|
2217
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
declare class MLCOptimizer extends NSObject implements NSCopying {
|
|
2221
|
+
learningRate: number
|
|
2222
|
+
|
|
2223
|
+
readonly gradientRescale: number
|
|
2224
|
+
|
|
2225
|
+
appliesGradientClipping: boolean
|
|
2226
|
+
|
|
2227
|
+
readonly gradientClipMax: number
|
|
2228
|
+
|
|
2229
|
+
readonly gradientClipMin: number
|
|
2230
|
+
|
|
2231
|
+
readonly regularizationScale: number
|
|
2232
|
+
|
|
2233
|
+
readonly regularizationType: interop.Enum<typeof MLCRegularizationType>
|
|
2234
|
+
|
|
2235
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
declare class MLCPoolingDescriptor extends NSObject implements NSCopying {
|
|
2239
|
+
readonly poolingType: interop.Enum<typeof MLCPoolingType>
|
|
2240
|
+
|
|
2241
|
+
readonly kernelWidth: number
|
|
2242
|
+
|
|
2243
|
+
readonly kernelHeight: number
|
|
2244
|
+
|
|
2245
|
+
readonly strideInX: number
|
|
2246
|
+
|
|
2247
|
+
readonly strideInY: number
|
|
2248
|
+
|
|
2249
|
+
readonly dilationRateInX: number
|
|
2250
|
+
|
|
2251
|
+
readonly dilationRateInY: number
|
|
2252
|
+
|
|
2253
|
+
readonly paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>
|
|
2254
|
+
|
|
2255
|
+
readonly paddingSizeInX: number
|
|
2256
|
+
|
|
2257
|
+
readonly paddingSizeInY: number
|
|
2258
|
+
|
|
2259
|
+
readonly countIncludesPadding: boolean
|
|
2260
|
+
|
|
2261
|
+
static poolingDescriptorWithTypeKernelSizeStride<This extends abstract new (...args: any) => any>(
|
|
2262
|
+
this: This,
|
|
2263
|
+
poolingType: interop.Enum<typeof MLCPoolingType>,
|
|
2264
|
+
kernelSize: number,
|
|
2265
|
+
stride: number,
|
|
2266
|
+
): InstanceType<This>
|
|
2267
|
+
|
|
2268
|
+
static maxPoolingDescriptorWithKernelSizesStridesPaddingPolicyPaddingSizes<
|
|
2269
|
+
This extends abstract new (...args: any) => any,
|
|
2270
|
+
>(
|
|
2271
|
+
this: This,
|
|
2272
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2273
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2274
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2275
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2276
|
+
): InstanceType<This>
|
|
2277
|
+
|
|
2278
|
+
static maxPoolingDescriptorWithKernelSizesStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
2279
|
+
This extends abstract new (...args: any) => any,
|
|
2280
|
+
>(
|
|
2281
|
+
this: This,
|
|
2282
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2283
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2284
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
2285
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2286
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2287
|
+
): InstanceType<This>
|
|
2288
|
+
|
|
2289
|
+
static averagePoolingDescriptorWithKernelSizesStridesPaddingPolicyPaddingSizesCountIncludesPadding<
|
|
2290
|
+
This extends abstract new (...args: any) => any,
|
|
2291
|
+
>(
|
|
2292
|
+
this: This,
|
|
2293
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2294
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2295
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2296
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2297
|
+
countIncludesPadding: boolean,
|
|
2298
|
+
): InstanceType<This>
|
|
2299
|
+
|
|
2300
|
+
static averagePoolingDescriptorWithKernelSizesStridesDilationRatesPaddingPolicyPaddingSizesCountIncludesPadding<
|
|
2301
|
+
This extends abstract new (...args: any) => any,
|
|
2302
|
+
>(
|
|
2303
|
+
this: This,
|
|
2304
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2305
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2306
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
2307
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2308
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2309
|
+
countIncludesPadding: boolean,
|
|
2310
|
+
): InstanceType<This>
|
|
2311
|
+
|
|
2312
|
+
static l2NormPoolingDescriptorWithKernelSizesStridesPaddingPolicyPaddingSizes<
|
|
2313
|
+
This extends abstract new (...args: any) => any,
|
|
2314
|
+
>(
|
|
2315
|
+
this: This,
|
|
2316
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2317
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2318
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2319
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2320
|
+
): InstanceType<This>
|
|
2321
|
+
|
|
2322
|
+
static l2NormPoolingDescriptorWithKernelSizesStridesDilationRatesPaddingPolicyPaddingSizes<
|
|
2323
|
+
This extends abstract new (...args: any) => any,
|
|
2324
|
+
>(
|
|
2325
|
+
this: This,
|
|
2326
|
+
kernelSizes: NSArray<interop.Object> | Array<interop.Object>,
|
|
2327
|
+
strides: NSArray<interop.Object> | Array<interop.Object>,
|
|
2328
|
+
dilationRates: NSArray<interop.Object> | Array<interop.Object>,
|
|
2329
|
+
paddingPolicy: interop.Enum<typeof MLCPaddingPolicy>,
|
|
2330
|
+
paddingSizes: NSArray<interop.Object> | Array<interop.Object> | null,
|
|
2331
|
+
): InstanceType<This>
|
|
2332
|
+
|
|
2333
|
+
copyWithZone(zone: interop.PointerConvertible): interop.Object
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
declare class MLCPoolingLayer extends MLCLayer {
|
|
2337
|
+
readonly descriptor: MLCPoolingDescriptor
|
|
2338
|
+
|
|
2339
|
+
static layerWithDescriptor<This extends abstract new (...args: any) => any>(
|
|
2340
|
+
this: This,
|
|
2341
|
+
descriptor: MLCPoolingDescriptor,
|
|
2342
|
+
): InstanceType<This>
|
|
2343
|
+
}
|