10
10
11
11
import com .facebook .soloader .nativeloader .NativeLoader ;
12
12
import com .facebook .soloader .nativeloader .SystemDelegate ;
13
- import java .util .Map ;
14
13
import org .pytorch .executorch .annotations .Experimental ;
15
14
16
15
/**
@@ -36,32 +35,18 @@ public class Module {
36
35
/** Reference to the NativePeer object of this module. */
37
36
private NativePeer mNativePeer ;
38
37
39
- /**
40
- * Loads a serialized ExecuTorch module from the specified path on the disk. Uses default load
41
- * FILE.
42
- *
43
- * @param modelPath path to file that contains the serialized ExecuTorch module.
44
- * @param extraFiles map with extra files names as keys, content of them will be loaded to values.
45
- * @return new {@link org.pytorch.executorch.Module} object which owns the model module.
46
- */
47
- public static Module load (final String modelPath , final Map <String , String > extraFiles ) {
48
- return load (modelPath , extraFiles , LOAD_MODE_FILE );
49
- }
50
-
51
38
/**
52
39
* Loads a serialized ExecuTorch module from the specified path on the disk.
53
40
*
54
41
* @param modelPath path to file that contains the serialized ExecuTorch module.
55
- * @param extraFiles map with extra files names as keys, content of them will be loaded to values.
56
42
* @param loadMode load mode for the module. See constants in {@link Module}.
57
43
* @return new {@link org.pytorch.executorch.Module} object which owns the model module.
58
44
*/
59
- public static Module load (
60
- final String modelPath , final Map <String , String > extraFiles , int loadMode ) {
45
+ public static Module load (final String modelPath , int loadMode ) {
61
46
if (!NativeLoader .isInitialized ()) {
62
47
NativeLoader .init (new SystemDelegate ());
63
48
}
64
- return new Module (new NativePeer (modelPath , extraFiles , loadMode ));
49
+ return new Module (new NativePeer (modelPath , loadMode ));
65
50
}
66
51
67
52
/**
@@ -71,7 +56,7 @@ public static Module load(
71
56
* @return new {@link org.pytorch.executorch.Module} object which owns the model module.
72
57
*/
73
58
public static Module load (final String modelPath ) {
74
- return load (modelPath , null );
59
+ return load (modelPath , LOAD_MODE_FILE );
75
60
}
76
61
77
62
Module (NativePeer nativePeer ) {
0 commit comments