Tensorflow
Example of Tensorflow framework with CUSTOM endpoints
Last updated
Was this helpful?
Was this helpful?
Stopping konduit server 'tensorflow-mnist'
Application 'tensorflow-mnist' terminated with status 0%%bash
konduit serve -id tensorflow-mnist -c tensorflow.json -rwm --backgroundStarting konduit server...
Using classpath: /root/konduit/bin/../konduit.jar
INFO: Running command /root/miniconda/jre/bin/java -Dkonduit.logs.file.path=/root/.konduit-serving/command_logs/tensorflow-mnist.log -Dlogback.configurationFile=/tmp/logback-run_command_5fd1b7c309d448ea.xml -jar /root/konduit/bin/../konduit.jar run --instances 1 -s inference -c tensorflow.json -Dserving.id=tensorflow-mnist
For server status, execute: 'konduit list'
For logs, execute: 'konduit logs tensorflow-mnist'%%bash
konduit logs tensorflow-mnist -l 100008:23:16.423 [main] INFO a.k.s.c.l.command.KonduitRunCommand - Processing configuration: /root/konduit/demos/4-tensorflow-mnist/tensorflow.json
.
.
.
####################################################################
# #
# | / _ \ \ | _ \ | | _ _| __ __| | / | / #
# . < ( | . | | | | | | | . < . < #
# _|\_\ \___/ _|\_| ___/ \__/ ___| _| _|\_\ _) _|\_\ _) #
# #
####################################################################
08:23:17.982 [vert.x-worker-thread-0] INFO a.k.s.v.verticle.InferenceVerticle - Pending server start, please wait...
.
.
.
08:23:18.145 [vert.x-eventloop-thread-0] INFO a.k.s.v.p.h.v.InferenceVerticleHttp - Inference HTTP server is listening on host: '0.0.0.0'
08:23:18.145 [vert.x-eventloop-thread-0] INFO a.k.s.v.p.h.v.InferenceVerticleHttp - Inference HTTP server started on port 9008 with 4 pipeline steps%%html
<div style="display: flex; justify-content: center; align-items: center; border: 1px solid black;">
<div style="display: inline-block; margin: 2px">
<img src="test_files/test_input_number_0.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_1.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_2.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_3.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_4.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_5.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_6.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_7.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_8.png"/>
</div>
<div style="display: inline-block; margin: 10px">
<img src="test_files/test_input_number_9.png"/>
</div>
</div>%%bash
konduit predict tensorflow-mnist --input-type multipart "image=@test_files/test_input_number_9.png"{
"output_layer/Softmax" : [ [ 3.0811898E-7, 6.085964E-6, 1.1470697E-4, 1.5436264E-9, 0.0023717284, 1.7763212E-12, 6.587209E-11, 0.99487466, 4.904844E-11, 0.0026325122 ] ],
"prob" : 0.9948746562004089,
"index" : 7,
"label" : "7"
}