Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalesh0406 authored Feb 1, 2021
1 parent 556b5ef commit 025fbc2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

This repository contains the code for our paper [SplitEasy: A Practical Approach for Training ML models on Mobile Devices in a split second](https://arxiv.org/abs/2011.04232).

The etnire code is written using React Native. To follow the general guideline for React Native apps follow this [link](https://developers.facebook.com/docs/react-native/getting-started/).
The entire code is written using React Native. To follow the general guideline for React Native apps follow this [link](https://developers.facebook.com/docs/react-native/getting-started/).

There are three parts to this code: loading the dataset on the mobile device, running the models on the mobile device and running the models on the server.


### Loading the dataset on the mobile device

The data files will be available in this [link](https://drive.google.com/drive/folders/1xxuEMNZbof0YWq6jri38iBIDoWkjtQEJ?usp=sharing). Move them to your assets folder. The json files are split into 5 parts each with 25 images, so that we can load the image into the phone.
The data files will be available in this [link](https://drive.google.com/drive/folders/1xxuEMNZbof0YWq6jri38iBIDoWkjtQEJ?usp=sharing). Move them to your assets folder. The json files are split into 4 parts each with 25 images, so that we can load the image into the phone.

Once the data is in the assets folder, go to *App.js* and ensure that you load the *LoadImageNet* component. The code will load take some time to load on your device, once it loaded click the load data button. The data that is being loaded will be logged in your terminal. Then, change the i value in line 58 of *imagenet_load.js* to i
+25 and change the name of the file to the next file. Repeat this process for 5 times and the data is loaded in your phone.
Once the data is in the assets folder, go to *App.js* and ensure that you load the *LoadImageNet* component. The code will take some time to load on your device during the first time, once it's done click the load data button. The index of the data being loaded will be logged in your terminal. Then, change the i value in line 58 of *imagenet_load.js* to i+25 and change the name of the file to the next file. Repeat this process for 5 times and the data is loaded in your phone.

### Loading the dataset on the mobile device

The component to load in your *App.js* now is the *SplitNet* component. The main changes to make in this component is to add the server url in the *App.js* file and *final_implementation.js* file. Based on the model, load the appropriate file for ModelA and ModelC, the files are availabe in this [link](https://drive.google.com/drive/folders/1xxuEMNZbof0YWq6jri38iBIDoWkjtQEJ?usp=sharing). The component will have the button for training the model and once you click it the values are logged in your terminal.

### Running the Server Code

The server code should preferably be run in a server with GPU support. The code requires the argument *--model_name* in which you mention the name of the architecture. Once you run the code, you can use the IP address of your server to run the javascript code.
The server code should preferably be run on a server with GPU support. The code requires the argument *--model_name* in which you mention the name of the architecture. Once you run the code, you can use the IP address of your server to run the javascript code.

0 comments on commit 025fbc2

Please sign in to comment.