tf.raw_ops.MapDefun
Stay organized with collections
Save and categorize content based on your preferences.
Maps a function on the list of tensors unpacked from arguments on dimension 0.
tf.raw_ops.MapDefun(
arguments, captured_inputs, output_types, output_shapes, f,
max_intra_op_parallelism=1, name=None
)
The function given by f
is assumed to be stateless, and is executed
concurrently on all the slices; up to batch_size (i.e. the size of the 0th
dimension of each argument) functions will be scheduled at once.
The max_intra_op_parallelism
attr, which defaults to 1, can be used to
limit the intra op parallelism. To limit inter-op parallelism, a user can
set a private threadpool on the dataset using tf.data.Options
's
ThreadingOptions
.
Note that this op is not exposed to users directly, but is invoked in tf.data
rewrites.
Args |
arguments
|
A list of Tensor objects.
A list of tensors whose types are Targuments , corresponding to the inputs
the function should be mapped over.
|
captured_inputs
|
A list of Tensor objects.
A list of tensors whose types are Tcaptured , corresponding to the captured
inputs of the defun.
|
output_types
|
A list of tf.DTypes that has length >= 1 .
A list of types.
|
output_shapes
|
A list of shapes (each a tf.TensorShape or list of ints ) that has length >= 1 .
A list of shapes.
|
f
|
A function decorated with @Defun.
|
max_intra_op_parallelism
|
An optional int . Defaults to 1 .
|
name
|
A name for the operation (optional).
|
Returns |
A list of Tensor objects of type output_types .
|
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. Some content is licensed under the numpy license.
Last updated 2021-05-14 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 2021-05-14 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 2021-05-14 UTC."],[],[]]