blob: 482ed372dc1e5da91ed00421c483609e32fbe595 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
syntax = "proto3";
package tensorflow.serving;
// Signatures of model export.
message Signatures {
// Default signature of the graph.
// WARNING(break-tutorial-inline-code): The following code snippet is
// in-lined in tutorials, please update tutorial documents accordingly
// whenever code changes.
Signature default_signature = 1;
// Named signatures of the graph.
map<string, Signature> named_signatures = 2;
};
// A binding to a tensor including the name and, possibly in the future, type
// or other metadata. For example, this may specify whether a tensor supports
// batch vs single inference.
message TensorBinding {
// The name of the tensor to bind to.
string tensor_name = 1;
};
// An asset file or set of sharded files with the same name that will be bound
// to a tensor at init / session_bundle load time.
message AssetFile {
// The tensor to bind the asset filename to.
TensorBinding tensor_binding = 1;
// The filename within the assets directory. Note: does not include the base
// path or asset directory prefix. Base paths can and will change when models
// are deployed for serving.
string filename = 2;
}
// A Signature specifies the inputs and outputs of commonly used graphs.
message Signature {
oneof type {
RegressionSignature regression_signature = 1;
ClassificationSignature classification_signature = 2;
GenericSignature generic_signature = 3;
}
};
// RegressionSignature specifies a graph that takes an input and returns an
// output.
message RegressionSignature {
TensorBinding input = 1;
TensorBinding output = 2;
};
// ClassificationSignature specifies a graph that takes an input and returns
// classes and their scores.
// WARNING(break-tutorial-inline-code): The following code snippet is
// in-lined in tutorials, please update tutorial documents accordingly
// whenever code changes.
message ClassificationSignature {
TensorBinding input = 1;
TensorBinding classes = 2;
TensorBinding scores = 3;
};
// GenericSignature specifies a map from logical name to Tensor name.
// Typical application of GenericSignature is to use a single GenericSignature
// that includes all of the Tensor nodes and target names that may be useful at
// serving, analysis or debugging time. The recommended name for this signature
// in the ModelManifest is "generic_bindings".
message GenericSignature {
map<string, TensorBinding> map = 1;
};
|