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

What is the current status? #6

Open
aoowweenn opened this issue May 6, 2018 · 5 comments
Open

What is the current status? #6

aoowweenn opened this issue May 6, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@aoowweenn
Copy link

aoowweenn commented May 6, 2018

I have used DISCO_F413ZH to try to reproduce this demo but it failed.
By commit da6615e, here is what I got:

In main.cpp, get_deep_mlp_ctx function does not match get_quant_model_ctx in models/deep_mlp.hpp

Running tensorflow-models/deep_mlp.ipynb is OK but
utensor-cli --output-nodes=OutputLayer/y_pred tensorflow-models/mnist_model/deep_mlp.pb
Output:

AssertionError: OutputLayer/y_pred is not in graph

So I tried:
utensor-cli tensorflow-models/mnist_model/deep_mlp.pb
and passed.
idx files will be like constants/deep_mlp/*.idx

Then copy constants folder to micro SD card and insert it to the board
cp constants /media/${USERNAME}/${SD_DEVICE} -r
And,
mbed deploy
mbed compile -m DISCO_F413ZH -t GCC_ARM --profile=uTensor/build_profile/release.json -f -c

After flashing the board, from CoolTerm output:

.program start...
Done padding

Reshaping

Creating Graph

[Error] ./uTensor/uTensor/loaders/tensorIdxImporter.cpp:61 @parseMeta Error opening file: /fs/constants/deep_mlp/Layer1_MatMul_eightbit_x_reshape_dims_0.idx

When I try to use Debug string
vim uTensor/uTensor/util/uTensor_util.hpp
Move enum Padding out of #if #endif block
vim mbed_app.json
Set the debug-msg value to “1”

Compile again and flash
mbed compile -m DISCO_F413ZH -t GCC_ARM --profile=uTensor/build_profile/release.json -f -c

Output:
program start...
 * SDBlockDevice init   [DONE]
 * Mounting the filesystem on "/fs".  [**Failure**] -2
Exiting…

Any ideas? My 2GB micro SD card is formatted to FAT32.

@neil-tan
Copy link
Member

neil-tan commented May 8, 2018

Hey! Thanks for bringing this to our attention. The last know-to-work commit is 78a2704.

@mbartling yo, mind having a look at this?

@neil-tan neil-tan assigned neil-tan and mbartling and unassigned neil-tan May 8, 2018
@neil-tan neil-tan added the bug Something isn't working label May 8, 2018
@mbartling
Copy link
Member

mbartling commented May 8, 2018

Hi @aoowweenn, thanks for pointing this out. It should be fixed in the latest commit. I went ahead and simplified the utensor-cli command in the README to:

&> utensor-cli tensorflow-models/mnist_model/deep_mlp.pb

64b8429

Can you try rerunning for me? Also, make sure the SD card is all the way in and not set to locked. pretty sure a bad connection is causing the mount error.

@mbartling
Copy link
Member

@dboyliao I think the output nodes error might be a bug in the code gen. I will take a look at this later

@mbartling
Copy link
Member

@aoowweenn, Can you check to see if it works now? I made some changes to master to make it a bit more stable. You should probably run through this from scratch FYI.

@aoowweenn
Copy link
Author

@neil-tan @mbartling ,
Thanks a lot! it works now and can really recognize my hand writing.
For the file system error, I just used another 16GB micro SD card without problems.
The log:

uTensor deep learning character recognition demo
https://github.com/uTensor/utensor-mnist-demo
Draw a number (0-9) on the touch screen, and press the button...
Done padding
Reshaping
Creating Graph
Evaluating
Number guessed 4
[Error] ./uTensor/uTensor/core/tensor.hpp:78 @allocate ran out of memory for 230400 malloc

Is that allocation error normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants