3 ms·
Is there a TF/Keras in Python to JavaScript transpiler somewhere? I don't want to waste time retyping complex methods to JS. Thanks for any suggestion!
by bitL 8y ago
Is there a TF/Keras in Python to JavaScript transpiler somewhere? I don't want to waste time retyping complex methods to JS. Thanks for any suggestion!
- halflings 8y agoYou can probably export your Keras model, load it in tensorflow.js, and train it. Makes more sense than transpiling. Guide here: https://js.tensorflow.org/tutorials/import-keras.html https://js.tensorflow.org/tutorials/import-keras.html
- bitL 8y agoThanks! Do you by chance know if it is practical to convert huge .h5 Keras models to TF.js layers model? (~1GB). I have some state-of-art computer vision models and it would be great if they could be used in a browser with a WebCam, if they can fit into memory and be performant for inferencing.
- zawerf 8y agoMobile has similar constraints as web (but to a lesser extent) so you will find more resources there. Look into quantizing the weights (e.g., reduce from 32bit per parameter to 8 bits) to reduce model size: https://www.tensorflow.org/mobile/optimizing#model_size https://www.tensorflow.org/mobile/optimizing#model_size