zaidalyafeai / ml-projects

Implementation of web friendly ML models using TensorFlow.js. pix2pix, face segmentation, fast style transfer and many more ...
MIT License
647 stars 254 forks source link

Total number of Shard files #11

Open ParvaShah opened 5 years ago

ParvaShah commented 5 years ago

I was making my own project on Quick draw Doodle challenge but I'm stuck at a point. When I'm trying to convert my model.h5 file to tensorflow.js compatible file I get only one Shard file and a json file. I have seen many people converting their model files to tensorflowjs compatible file and they end up having 4-5 Shard files. Can you please explain to me why is it so?

I'm getting 97% accuracy on training and 95.08% on testing data but when I load my model to browser its doesn' t perform well or rather performs very poorly. I have just used 3 categories for now.

I guess due to some problem in file conversion my model is performing poorly. Your help would be much appreciated

zaidalyafeai commented 5 years ago

@ParvaShah , the Shard files represent the weights of the model. So, if the model is small you should have a smaller number of Shard files. So, I think there is no problem with that I think. If you are getting wrong results when predicting in the browser make sure you are preprocessing the inputs correctly i.e normalization.