codecamp

TensorFlow 变量

注意:接受Tensor参数的函数也可以接受被 tf.convert_to_tensor 接受的任何内容。

变量

  • tf.Variable

变量帮助函数

TensorFlow 提供了一组函数来帮助管理在关系图中收集的变量集。

保存和恢复变量

  • tf.train.Saver
  • tf.train.latest_checkpoint
  • tf.train.get_checkpoint_state
  • tf.train.update_checkpoint_state

共享变量

TensorFlow 提供了几个类和操作,您可以使用它们在特定条件下创建变量。

切分变量分区

稀疏变量更新

稀疏更新操作修改稠密变量中的条目子集,改写条目或添加/减去增量。这对于训练嵌入模型和类似的属性网络非常有用,因为在任何给定的步骤中,只有一小部分嵌入向量发生变化。
由于大张量的稀疏更新可以在渐变计算过程中自动生成 (如在 tf 的渐变中)。一个提供的 IndexedSlices 类封装了一组稀疏索引和值。大多数情况下,优化会自动检测和处理 IndexedSlices 对象。

只读查询表

  • tf.initialize_all_tables
  • tf.tables_initializer

导出和导入元图

  • tf.train.export_meta_graph
  • tf.train.import_meta_graph

已弃用的函数(2017-03-02之后删除),请不要使用它们。

  • tf.all_variables
  • tf.initialize_all_variables
  • tf.initialize_local_variables
  • tf.initialize_variables
TensorFlow 实用程序(contrib)
TensorFlow 包装python函数
温馨提示
下载编程狮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; }