Comments (9)
Yes. You can use a Predict SignatureDef with the Predict API. See https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/signature_defs.md for more details.
from serving.
Secondly.
When exporter.init()
is run with sess.graph.as_graph_def()
and signature
as params - is the model now only capable of being invoked using this signature?
For instance, what if my model can take multiple inputs, and I export it via Serving - am I now constrained by what the classification_signature can take?
from serving.
Hi viksit@,
Think of the signatures as annotations on the graph used for serving. They don't modify or constrain the graph in any way, so you can use it however you like. Although there is only one default signature, you can also have arbitrarily many named signatures. This can help if, for example, you want to experiment by taking outputs from different layers of a graph, but keep your code that runs inference the same.
For concatenating tensors, I think you would need to create a tensor in the graph that does the concatenation, and then reference that new single tensor, to get the behavior (I think) you are looking for in the first question.
Hope this helps. Thanks!
Noah
from serving.
Thanks, @nfiedel. Makes sense.
But to reiterate - there's no way to actually change the signature to use two or more input tensors right now (not output)? Given everything is around "Classification"?
from serving.
Hi viksit@,
That's right (for now). If you have different input/output patterns, you can easily use the generic_signature to capture named inputs & outputs.
from serving.
Related to the multiple input question would be how to deal with passing in an is_training
value (presumably to False) in order to disable dropout, etc. When training validating, I use the feed dict to set this.
from serving.
is there a new solution to this problem? Generic_signature is deprecated
from serving.
@kirilg With the predict API, using multiple inputs does not work.
I constructed a toy example similar to this with a simple operation.. When I only have one input, things work fine, but if I construct the graph such that it accepts 2 placeholders following a concat operation, with the appropriate output. I get an error that I must feed a placeholder value.
$saved_model_cli run --dir /tmp/saved_model_dir --tag_set serve
--signature_def x1_x2_to_y --inputs x1=/tmp/my_data1.npy;x2=/tmp/my_data2.npy
--outdir /tmp/out
from serving.
Let's follow up on the saved_model_cli issue in the other issue you filed (#702 for posterity).
from serving.
Related Issues (20)
- Failed to build Tensorflow serving Dockerfile(TF2.4.4) HOT 4
- Are TF Serving minor versions always backwards compatible? HOT 4
- TF 2.11 on CUDA 11.8 HOT 5
- Failed to build TF serving from source HOT 4
- Segmentation Fault in TF 2.11 HOT 9
- Create special docker images for AVX2/FMA et al support, with special tags HOT 2
- Memory usage of TensorFlow models HOT 7
- Continuous batching HOT 3
- Increased memory usage on TF 2.11 HOT 4
- TensorBoard profile showing high usage of relu HOT 6
- Building tensorflow serving with TCMalloc HOT 1
- Unable to compile prediction_service.proto for Golang HOT 4
- TF Serving batching for Sparse Tensors HOT 6
- TF Serving gets stuck in the polling loop due to a non-existing model provided in config file HOT 3
- Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT HOT 3
- TensorFlow serving seems to have no version attribute HOT 3
- GPU inference in Docker container fails due to missing libdevice directory HOT 4
- CPU Memory occupied by TF Serving even though serving is on GPU HOT 6
- Version 2.15 release? HOT 7
- Mismatch between TensorRT version used in TF 2.14 GPU docker images for tensorflow/serving and tensorflow/tensorflow causes segfault during inference HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serving.