1010
1111import com .facebook .soloader .nativeloader .NativeLoader ;
1212import com .facebook .soloader .nativeloader .SystemDelegate ;
13- import java .util .Map ;
1413import org .pytorch .executorch .annotations .Experimental ;
1514
1615/**
@@ -36,32 +35,18 @@ public class Module {
3635 /** Reference to the NativePeer object of this module. */
3736 private NativePeer mNativePeer ;
3837
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-
5138 /**
5239 * Loads a serialized ExecuTorch module from the specified path on the disk.
5340 *
5441 * @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.
5642 * @param loadMode load mode for the module. See constants in {@link Module}.
5743 * @return new {@link org.pytorch.executorch.Module} object which owns the model module.
5844 */
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 ) {
6146 if (!NativeLoader .isInitialized ()) {
6247 NativeLoader .init (new SystemDelegate ());
6348 }
64- return new Module (new NativePeer (modelPath , extraFiles , loadMode ));
49+ return new Module (new NativePeer (modelPath , loadMode ));
6550 }
6651
6752 /**
@@ -71,7 +56,7 @@ public static Module load(
7156 * @return new {@link org.pytorch.executorch.Module} object which owns the model module.
7257 */
7358 public static Module load (final String modelPath ) {
74- return load (modelPath , null );
59+ return load (modelPath , LOAD_MODE_FILE );
7560 }
7661
7762 Module (NativePeer nativePeer ) {
0 commit comments