This is what I think is the minimum viable solution and also serves as an RFC for the direction in which this API should evolve. With this change resource variables behave exactly the same way as regular input/outputs, any variable gets translated into a pair of argument/result accessors. Initial values coming from the graph are ignored, the user has to supply their own instead. For the configuration this requires specifying name/shape/type for all variables used in the model. I tried to infer the shape from the graph but it's rather annoying because the arguments are create very early in the process. This is intentionally lacking documentation, setting the API in stone now seems too early. It's unclear to me whether we want to keep the argument/result matching long-term or switch to something that supports in-place updates. The current API cannot do that because it would violate const correctness. PiperOrigin-RevId: 233042296
13 lines
168 B
Plaintext
13 lines
168 B
Plaintext
# Text form of tensorflow.tf2xla.Config proto.
|
|
fetch {
|
|
id { node_name: "result" }
|
|
}
|
|
|
|
variable {
|
|
node_name: "x"
|
|
shape {
|
|
dim { size: 1 }
|
|
}
|
|
type: DT_FLOAT
|
|
}
|