![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TensorFlow
holeung
东南大学
展开
-
[TensorFlow学习手记] 6 - 建造AlexNet
秉持着打代码学习的习惯,将《TensorFlow实战》实现一讲。关于AlexNet 代码加注释 Code'''建立一个完整的AlexNet卷积神经网络,然后对它每个batch的前馈计算(forward)和反馈计算(backward)的速度进行测试,这里使用随机图片数据来计算每轮前馈、反馈的平均耗时。holeung2017.11.29'''from datetime im原创 2017-11-30 00:13:17 · 527 阅读 · 0 评论 -
[TensorFlow学习手记] 1-简单例子
Codeimport tensorflow as tfimport numpy as np# create datax_data = np.random.rand(100).astype(np.float32)y_data = x_data*0.1 + 0.3### create tensorflow structure start ###Weights = tf.Variable(tf.r原创 2017-11-23 17:46:43 · 497 阅读 · 0 评论 -
[TensorFlow学习手记] 2 - Session 会话控制的简单运用
## sess Session 会话控制的简单运用## sess 每run一次,便执行一次结构## sess.close() import tensorflow as tfmatrix1 = tf.constant([[3,3]]) # 1*3 矩阵matrix2 = tf.constant([[2], [2]]) # 2*1 矩阵produ原创 2017-11-23 18:01:52 · 397 阅读 · 0 评论 -
[TensorFlow学习手记] 3 - Variable变量和Placeholder简单运用
'''Variable 变量2017.11.23TF中的变量必须先定义'''import tensorflow as tf state = tf.Variable(0,name='counter') # 初始值0,名字为counterprint(state.name)one = tf.constant(1) # 常量1new_value = tf.add(state , one)u原创 2017-11-23 22:40:26 · 1151 阅读 · 0 评论 -
[TensorFlow]学习手记 4 - 激励函数
ResultCodeimport tensorflow as tf import numpy as np import matplotlib.pyplot as plt # fake datax = np.linspace(-5,5,200) # x data,shape(100,1)# following are popular activation functiony_relu =原创 2017-11-24 09:20:07 · 536 阅读 · 0 评论 -
[TensorFlow学习手记] 5 - 建造神经网络
Codeimport tensorflow as tf import matplotlib.pyplot as plt import numpy as np '''Add layer定义添加神经层的函数def add_layer(),它有四个参数:输入值、输入的大小、输出的大小和激励函数,我们设定默认的激励函数是None'''def add_layer(inputs, in_size,原创 2017-11-24 11:54:12 · 576 阅读 · 0 评论