简体   繁体   English

如何在 Python 中使用 tensorflow 训练图像分类器模型并在 Java 应用程序中使用训练后的模型?

[英]How can i train a Image classifier model with tensorflow in Python and use the trained model in Java application?

I'm trying to build a client-Server Application where client is an android device and server is a windows Pc.it would be easy to do socket programming in java for building the complete application.At first, I tried to build the server side completely in python because of the image classifier I wrote in python.我正在尝试构建一个客户端 - 服务器应用程序,其中客户端是 android 设备,服务器是 Windows Pc。在 java 中进行套接字编程以构建完整的应用程序很容易。首先,我尝试构建服务器端完全在 python 中,因为我用 python 编写的图像分类器。 but it got me into problems when I started working on the socket.Now, I want to use python trained model in java.但是当我开始处理套接字时,它让我遇到了问题。现在,我想在 java 中使用 python 训练模型。

please help me out.请帮帮我。

python trained model服务器提供http api,接受图像,返回分类结果

You can save the trained model in h5 file format which can be used in both java and python code piece.您可以将训练好的模型保存为 h5 文件格式,该文件格式可用于 java 和 python 代码段。

You can use this for reference你可以参考这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflow:如何在java中使用在python中训练的语音识别模型 - Tensorflow : How to use speech recognition model trained in python in java 如何使用TensorFlow Java API移除预训练模型的输出层? - How can I remove the output layer of pre-trained model with TensorFlow java api? 如何使用java在tensorflow中训练模型 - How to train a model in tensorflow using java 如何在java中训练keras(tensorflow)模型? - How to train a keras ( tensorflow) model in java? Java-火车加载的Tensorflow模型 - Java - train loaded tensorflow model 如何从MatLab导出经过训练的SVM模型以在Android(Java)中使用 - How can I export the trained SVM model from MatLab to use in Android(Java) 如何将预训练的张量流模型加载并预测到Java代码中? - How to load and predict a pre-trained tensorflow model into Java code? 在 Java 应用程序中使用经过训练的 LibSVM 模型的最佳方法是什么? - What is the best way to use a trained LibSVM model inside a Java application? 如何将训练有素的 tensorflow 2 model 导出到 tflite? - How to export trained tensorflow 2 model to tflite? 如何在Java sphinx4项目中导入和使用经过训练的声学模型 - how to import and use a trained acoustic model in a java sphinx4 project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM