majianjia / nnom

A higher-level Neural Network library for microcontrollers.
Apache License 2.0
909 stars 245 forks source link

what does the input data looks like when I wanna generate weight.h for a NN that includes 3 branches? #142

Open Dark-Chao opened 3 years ago

Dark-Chao commented 3 years ago

hi, I have my NN with Concatenate layer for 3 branches. My input data for each branch is nparray(2974, 128, 3), where 2974 is the number of data pieces. When I want to generate weight.h by using nnom.generate_model(model, data, name='weights.h'), I have no idea how the data required by the function looks like. Is it a list of 3 nparray? or what type and shape it should be? 2 multi_motions_s123_91

Many Thanks Chao

majianjia commented 3 years ago

The current version doesn't support multiple inputs. The input data is only to calibrate the model, i.e. run the model and get the intermediate activation ranges for quantisation. It can be a segment of your training/testing data, same shape but with a different number of pieces.

If you want to use a multiple inputs model as you showed.

Dark-Chao commented 3 years ago

Thanks for your reply. Are you gonna upgrade it to support this feature in the future?

majianjia commented 3 years ago

yes i will add this function

Dark-Chao commented 3 years ago

Please let me know when it's available.

Thanks!!