codecamp

TensorFlow函数教程:tf.profiler.profile

tf.profiler.profile函数

tf.profiler.profile(
    graph=None,
    run_meta=None,
    op_log=None,
    cmd='scope',
    options=_DEFAULT_PROFILE_OPTIONS
)

定义在:tensorflow/python/profiler/model_analyzer.py。

profile模型。

可以在以下网址找到教程和示例:https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/README.md

参数:

  • graph:tf.Graph。如果是“None”或者未启用“eager执行”,请使用默认图形。
  • run_meta:可选的tensorflow.RunMetadata proto。有必要支持运行时信息分析,例如时间和内存。
  • op_log:tensorflow.tfprof.OpLogProto proto。用户可以使用op_log为图节点分配“types”。“types”允许用户使用选项['accounts_type_regexes']灵活地分组和帐户配置文件。
  • cmd:字符串。可以是:'op','scope','graph'或'code'。'op'视图使用操作类型组织profile。(例如,MatMul)“scope”视图使用图形节点名称范围组织profile。“graph”视图使用图形节点输入/输出组织profile。'code'视图使用Python调用堆栈组织profile。
  • options:选项的一个词。

返回:

如果cmd是'scope'或'graph',则返回GraphNodeProto proto。如果cmd是'op'或'code',则返回MultiGraphNodeProto proto。副作用:stdout/file/timeline.json取决于选项['output']。

TensorFlow函数教程:tf.profiler.OpLogProto.IdToStringEntry
TensorFlow函数教程:tf.profiler.ProfileOptionBuilder
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

TensorFlow 函数介绍

TensorFlow 函数模块:tf

TensorFlow的image模块

TensorFlow使用之tf.io

TensorFlow使用之tf.keras

TensorFlow函数教程:tf.keras.applications

TensorFlow函数教程:tf.keras.backend

TensorFlow使用之tf.metrics

TensorFlow使用之tf.nn

TensorFlow使用之tf.python_io

TensorFlow 功能函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }