I’ve been reading about TF Serving quite a bit, trying to decide if it makes sense to be using it for some applications that I’m working on. As I’ve been studying up on it , I’ve run into a few things that I can’t seem to answer myself, so I thought I would turn to you beautiful people to see if I could find some answers that I haven’t been able to figure out so far.
1) Trying to build the Docker image in the first place. I read through the documentation on https://www.tensorflow.org/tfx/serving/docker and followed the directions to get my model into a Docker image. However, due to the constraints of what I’m working on, I need to be able to build the container from a Dockerfile in the first place. I found the Dockerfile for TF Serving on Github here: https://github.com/tensorflow/serving/blob/master/tensorflow_serving/tools/docker/Dockerfile.devel But when I build that image, it’s like… 20 times the size of the 300MB one that I get when following the instructions in the docs. I’m looking for a way to have a Dockerfile that I can build into the 300MB image… so that’s one question.
2) My model currently expects an input of a multi dimensional Tensor. With TF Serving using JSON (a requirement to use instead of gRPC on this project… comes from on high and can’t do anything about it), it looks like my options are basically to use something Base64 encoded. Is there a way to circumnavigate this so that I can send a multidimensional Tensor to my model or do I have to rebuild my model so that it can take in a Base64 image? Ideally… I would like to be able to send the file path to the TF Serving Docker and it would pick it up and go from there, but it doesn’t seem like that’s an option. So I suppose the question is… is base64 the only way to get an image to the model using JSON?
Thanks for any answers… I’ve been banging my head on this off and on for the last month and would love any input that you guys can give me!
submitted by /u/TypeAskee
[visit reddit] [comments]