举例说明函数tf.train.exponential_decay用法
来源:互联网 发布:宝信软件 编辑:程序博客网 时间:2024/06/12 19:32
import tensorflow as tf import matplotlib.pyplot as plt learning_rate = 0.1 decay_rate = 0.99 global_steps = 1000 decay_steps = 100 global_ = tf.placeholder(tf.int32)c = tf.train.exponential_decay(learning_rate, global_, decay_steps, decay_rate, staircase=True) d = tf.train.exponential_decay(learning_rate, global_, decay_steps, decay_rate, staircase=False) T_C = [] T_D = [] with tf.Session() as sess: sess.run(tf.global_variables_initializer()) for i in range(global_steps): T_c = sess.run(c,feed_dict={global_: i}) T_C.append(T_c) T_d = sess.run(d,feed_dict={global_: i}) T_D.append(T_d) plt.figure(1) plt.plot(range(global_steps), T_D, 'r-') plt.plot(range(global_steps), T_C, 'b-') plt.show()
参考:http://blog.csdn.net/uestc_c2_403/article/details/72356448
阅读全文
1 0
- 举例说明函数tf.train.exponential_decay用法
- tf.train.exponential_decay 用法
- tf.train.exponential_decay的用法
- tf.train.exponential_decay的用法
- TensorFlow中tf.train.exponential_decay的用法
- tf.train.exponential_decay()
- Tensorflow中tf.train.exponential_decay函数(指数衰减法)
- Tensorflow中tf.train.exponential_decay函数(指数衰减法)
- tebsorflow学习——tf.train.ExponentialMovingAverage与tf.train.exponential_decay
- tf.train.ExponentialMovingAverage用法
- TensorFlow-方法train.exponential_decay()
- tf.train.ExponentialMovingAverage的用法
- tf.train.batch和tf.train.shuffle_batch的用法
- tf.train.batch和tf.train.shuffle_batch的用法
- 【Tensorflow】tf.train.AdamOptimizer函数
- tf.train.shuffle_batch函数解析
- tf.train.batch()和tf.train.shuffle_batch()函数
- tf.train.Saver函数的用法之保存全部变量和模型
- 快速幂
- pair 的用法
- python入门(三):条件判断 if elif else
- 深入Java集合学习系列:HashMap的实现原理
- 欢迎使用CSDN-markdown编辑器
- 举例说明函数tf.train.exponential_decay用法
- 恶意代码分析实战 课后题 Lab11-02
- MySql数据库与sql语言(一)---数据库的安装
- 裸机程序-dnw-usb驱动问题(个人经验)
- Python 日期和时间
- 每日一题——位图
- javaScript & jquery完美判断图片是否加载完毕
- 回溯法(DFS)
- 堆和栈的区别