Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to decode #4

Open
ramrahu opened this issue Apr 3, 2019 · 10 comments
Open

Not able to decode #4

ramrahu opened this issue Apr 3, 2019 · 10 comments

Comments

@ramrahu
Copy link

ramrahu commented Apr 3, 2019

Hi,
I am trying to fit my own model in this app. When I speak into the app, it extracts & prints the MFCC features, but crashes afterwards giving the following error:

04-03 12:56:16.754 24654-24815/org.tensorflow.demo E/TensorFlowInferenceInterface: Failed to run TensorFlow inference with inputs:[SeqLen], outputs:[SparseToDense]

--------- beginning of crash

04-03 12:56:16.755 24654-24815/org.tensorflow.demo E/AndroidRuntime: FATAL EXCEPTION: Thread-7556
Process: org.tensorflow.demo, PID: 24654
java.lang.IllegalArgumentException: Expects arg[0] to be int32 but float is provided
at org.tensorflow.Session.run(Native Method)
at org.tensorflow.Session.access$100(Session.java:48)
at org.tensorflow.Session$Runner.runHelper(Session.java:314)
at org.tensorflow.Session$Runner.run(Session.java:264)
at org.tensorflow.contrib.android.TensorFlowInferenceInterface.run(TensorFlowInferenceInterface.java:228)
at org.tensorflow.contrib.android.TensorFlowInferenceInterface.run(TensorFlowInferenceInterface.java:197)
at org.tensorflow.contrib.android.TensorFlowInferenceInterface.run(TensorFlowInferenceInterface.java:187)
at org.tensorflow.demo.SpeechActivity.recognize(SpeechActivity.java:229)
at org.tensorflow.demo.SpeechActivity.access$100(SpeechActivity.java:48)
at org.tensorflow.demo.SpeechActivity$3.run(SpeechActivity.java:193)
at java.lang.Thread.run(Thread.java:818)

Can someone please help me fix this?

@mina1996
Copy link

mina1996 commented Apr 3, 2019

sorry my own model doesn't open at all so could you help me how you reach to this error as the model couldn't be read in the android it says no inference graph in this path or it couldn't be read also i can't find the workspace that include the sdk path or ndk path to make bazel build
can you help me?

@ramrahu
Copy link
Author

ramrahu commented Apr 3, 2019

If I have understood you correctly, I guess you have trained your model & then run export_lstm_pb.py to generate .pb file and then you are stuck after that?

@mina1996
Copy link

mina1996 commented Apr 4, 2019

yes also i tried to train on wavnet then used export_wave_pb.py and also same error it couldn't be read i don't reach the mfcc

@ramrahu
Copy link
Author

ramrahu commented Apr 5, 2019

ok did you run those bazel commands mentioned in the tutorial on it? After I ran them, I got a .so and .jar file which i pasted in the libs folder & then ran the code.
Have a check on the android studio Logcat too to see what error gets displayed when it crashes

@mina1996
Copy link

mina1996 commented Apr 7, 2019

I had a problem with bazel as when I tried to run on tensorflow i can't find the NDK and SDK lines in the workspace also the version of bazel was 19, not 0.5.4 so what is the versions you used for both tensor and bazel and in the workspace

@ramrahu
Copy link
Author

ramrahu commented Apr 8, 2019

my bazel version was also 19. I'm not sure yet what exactly your error was. Maybe if you can share a screen shot of it?

@mina1996
Copy link

mina1996 commented Apr 8, 2019

i have one more question till get a screen shot of the error what is the version of NDK and from where you get tensorflow finaly how to ad ops in the workspace

@ramrahu
Copy link
Author

ramrahu commented Apr 12, 2019

I guess its version 11.

@ramrahu
Copy link
Author

ramrahu commented May 15, 2019

anyone has a solution to my problem?

@jtdutta1
Copy link

jtdutta1 commented Oct 1, 2019

How were you able to edit the WORKSPACE file? I didn't find any NDK or SDK lines to uncomment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants