tf.compat.v1.profiler.profile
Stay organized with collections
Save and categorize content based on your preferences.
Profile model.
tf.compat.v1.profiler.profile(
graph=None,
run_meta=None,
op_log=None,
cmd='scope',
options=_DEFAULT_PROFILE_OPTIONS
)
Tutorials and examples can be found in:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/g3doc/python_api.md
Args |
graph
|
tf.Graph. If None and eager execution is not enabled, use default
graph.
|
run_meta
|
optional tensorflow.RunMetadata proto. It is necessary to
support run time information profiling, such as time and memory.
|
op_log
|
tensorflow.tfprof.OpLogProto proto. User can assign "types" to graph
nodes with op_log. "types" allow user to flexibly group and account
profiles using options['accounted_type_regexes'].
|
cmd
|
string. Either 'op', 'scope', 'graph' or 'code'. 'op' view organizes
profile using operation type. (e.g. MatMul) 'scope' view organizes profile
using graph node name scope. 'graph' view organizes profile using graph
node inputs/outputs. 'code' view organizes profile using Python call
stack.
|
options
|
A dict of options. See core/profiler/g3doc/options.md.
|
Returns |
If cmd is 'scope' or 'graph', returns GraphNodeProto proto.
If cmd is 'op' or 'code', returns MultiGraphNodeProto proto.
Side effect: stdout/file/timeline.json depending on options['output']
|
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 2024-04-26 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 2024-04-26 UTC.",
"confidential": False
}