analyticszoo开发

Analytics Zoo 模型预测部分
1.注意事项
1.1 目前Analytics Zoo加载Tensorflow模型并以OpenVINO加速只支持Linux平台,推荐使用Ubuntu 16.04,MACOS的支持将在下一版本的Analytics Zoo中发布。
1.2 本地进行开发调试时,请注意:OpenVINO推理节点上需要安装以下python3和相关lib:
apt install python3-pip
pip3 install numpy
pip3 install networkx
pip3 install tensorflow
2.开发相关
2.1 pom依赖,请添加以下repository以及依赖:


ossrh
sonatype repository
https://oss.sonatype.org/content/groups/public/

true


true



  
    com.intel.analytics.zoo
    analytics-zoo-bigdl_0.9.0-spark_2.4.3
    0.6.0-SNAPSHOT
  
  
    com.intel.analytics.zoo
    zoo-core-dist-all
    0.6.0-SNAPSHOT
  

2.2 继承InferenceModel(Scala)或AbstractInferenceModel(Java)来加载模型(doLoadTF)以及预测(doPredict)
class GarbageClassificationInferenceModel(savedModelTarBytes: Array[Byte], inputShape: Array[Int], ifReverseInputChannels: Boolean, meanValues: Array[Float], scale: Float, input: String) extends InferenceModel(1) with Serializable {
  doLoadTF(savedModelTarBytes, inputShape, ifReverseInputChannels, meanValues, scale, input)

}
3.其他参考资料:
Analytics-Zoo的文档 https://analytics-zoo.github.io/master/#ProgrammingGuide/inference/
Analytics-Zoo的Github Repo: https://github.com/intel-analytics/analytics-zoo
在flink上用Analytics Zoo进行model inference的相关ppt https://files.alicdn.com/tpsservice/8d4949d7f6a8c685fc3bcf4f23bc76c1.pdf
欢迎大家提issue到 https://github.com/intel-analytics/analytics-zoo/issues

你可能感兴趣的:(其他)