2024-05-08 16:50:20 发布
网友
有没有可能从一个已经训练过的神经网络中引入一个用python编写的代码,并将其引入android?我曾尝试使用Java,但Nd4j和OpenCV所需的库非常繁重,我曾尝试使用BeeWare,但它不支持TensorFlow,Kivy也不支持TensorFlow,有没有办法
我想这就是你要找的。使用TensorFlow Lite转换器在Python上转换模型,然后在Android应用程序中使用转换后的模型
这是谷歌网站上关于如何转换的代码片段:
import tensorflow as tf converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) tflite_model = converter.convert() open("converted_model.tflite", "wb").write(tflite_model)
我想这就是你要找的。使用TensorFlow Lite转换器在Python上转换模型,然后在Android应用程序中使用转换后的模型
这是谷歌网站上关于如何转换的代码片段:
相关问题 更多 >
编程相关推荐