File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
extension/apple/ExecuTorch/Exported Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,22 @@ @implementation ExecuTorchModule {
249249 NSMutableDictionary <NSString *, NSMutableArray <ExecuTorchValue *> *> *_outputs;
250250}
251251
252+ - (instancetype )initWithFilePath : (NSString *)filePath
253+ dataPath : (NSString *)dataPath
254+ loadMode : (ExecuTorchModuleLoadMode)loadMode {
255+ self = [super init ];
256+ if (self) {
257+ _module = std::make_unique<Module>(
258+ filePath.UTF8String ,
259+ dataPath.UTF8String ,
260+ static_cast <Module::LoadMode>(loadMode)
261+ );
262+ _inputs = [NSMutableDictionary new ];
263+ _outputs = [NSMutableDictionary new ];
264+ }
265+ return self;
266+ }
267+
252268- (instancetype )initWithFilePath : (NSString *)filePath
253269 loadMode : (ExecuTorchModuleLoadMode)loadMode {
254270 self = [super init ];
You can’t perform that action at this time.
0 commit comments