tfp.experimental.auto_batching.virtual_machine.execute
Stay organized with collections
Save and categorize content based on your preferences.
Executes or stages a complete auto-batching VM program.
tfp.experimental.auto_batching.virtual_machine.execute(
program, args, max_stack_depth, backend, block_code_cache=None
)
Whether this executes or stages computation depends on whether the backend has
an eager or deferred computation model.
The dimensions of the inputs and internal variables are split into
one top batch dimension and an arbitrary number (here E
) event
dimensions. The event rank may be different for different inputs,
outputs, and internal variables.
Args |
program
|
A instructions.Program to execute or stage.
|
args
|
Input values, a list of arrays, each of shape [batch_size,
e1, ..., eE] . The batch size must be the same for all inputs.
The other dimensions must agree with the declared shapes of the
variables they will be stored in, but need not in general be the
same as one another.
|
max_stack_depth
|
Python int . Maximum depth of stack to allocate.
|
backend
|
Object implementing required backend operations.
|
block_code_cache
|
Dict (allows cache to live across calls to vm.execute ,
or None (in which case a dict is created and used per call).
|
Returns |
results
|
A list of the output values. Each returned value is an
array of shape [batch_size, e1, ..., eE] . The results are
returned in the same order as the variables appear in
program.out_vars .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-11-21 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[]]