Skip to content

Commit

Permalink
Update MainActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
aqibsaeed authored Dec 30, 2019
1 parent f8e1f88 commit 890fdbd
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ private void activityPrediction()
// Mean normalize the signal
normalize();

// Copy all x,y and z values to one array of shape N_SAMPLES*3
input_signal.addAll(x); input_signal.addAll(y); input_signal.addAll(z);
// Copy all x,y and z values to input_signal
for(int i = 0; i < NUM_SAMPLES; i++)
{
input_signal.set(i, x.get(i));
input_signal.set(i, y.get(i));
input_signal.set(i, z.get(i));
}

// Perform inference using Tensorflow
float[] results = activityInference.getActivityProb(toFloatArray(input_signal));
Expand Down

0 comments on commit 890fdbd

Please sign in to comment.