自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 基于Tensorflow的MNIST手写数字识别分类

代码如下:import tensorflow as tfimport numpy as npfrom tensorflow.examples.tutorials.mnist import input_datafrom tensorflow.contrib.tensorboard.plugins import projectorimport timeIMAGE_PIXELS = 2...

2019-03-25 19:50:38 310

原创 TensorFlow实现一元线性回归

代码import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plttrain_x = np.array([[3.3], [4.4], [5.5], [6.71], [6.93], [4.168], [9.779], [6.128], [7.59], [2.167]...

2019-03-07 10:42:16 445

原创 TensorFlow梯度下降

梯度的整个计算过程分为三步:计算梯度处理梯度应用梯度import tensorflow as tfx = tf.Variable(1.0)y = x**2optimizer = tf.train.GradientDescentOptimizer(learning_rate = 0.1)global_step = tf.Variable(0, trainable = False...

2019-03-06 19:41:31 433

原创 TensorFlow用tf.gradients()求梯度发生错误

import tensorflow as tfw1 = tf.Variable([[1, 2]]) #int型res = tf.matmul(w1, [[2], [1]]) #int型grads = tf.gradients(res, w1)with tf.Session() as sess: sess.run(tf.global_variables_initializer...

2019-03-05 22:09:48 999

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除