fetch_data
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Obtains the graph output data.
Prototype
1 | fetch_data(indexes=None, timeout=-1) |
Parameters
Parameter |
Data Type |
Value Description |
|---|---|---|
indexes |
List[int] |
Index of the output data, which must be unique. The value range is [0, N – 1], where N indicates the number of output data records. One or more values are supported. The default value is None, indicating that all outputs are fetched. For example, [0, 2] indicates that the first and third outputs are fetched. |
timeout |
int |
Timeout period for fetching data, in ms. The value range is [0, 2147483647), and the value -1 indicates that no timeout will occur. |
Returns
Tuple[List["Tensor"], FlowInfo, int] is returned.
In normal scenarios, the last return value of a tuple is 0 (success).
In case of exceptions, the last return value of a tuple indicates the specific error code.
Examples
1 2 3 4 | import dataflow as df graph = df.FlowGraph(...) graph.feed_data(...) graph.fetch_data(...) |
Constraints
None