
MachineLearning
记录机器学习笔记
你是我的星冰乐
这个作者很懒,什么都没留下…
展开
-
(三)--MNIST数据集分类(简单版本)
[toc] MNIST数据集分类(简单版本)import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data#载入数据集mnist=input_data.read_data_sets("MNIST_data",one_hot=Tru...原创 2020-10-15 20:02:43 · 323 阅读 · 0 评论 -
(二)--线性回归
[toc] 线性回归import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #使用numpy生成200个的随机点 x_data=np.linspace(-0.5,0.5,200)[:,np.newaxis] #增加了一个维度,即200...原创 2020-10-15 20:02:43 · 110 阅读 · 0 评论 -
(四)--Dropout
[toc] Dropoutimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data#载入数据集mnist=input_data.read_data_sets("MNIST_data",one_hot=True) #one_h...原创 2020-10-15 20:02:43 · 120 阅读 · 0 评论 -
(一)--小示例
[toc] Fetchinput1=tf.constant(3.0)input2=tf.constant(2.0)input3=tf.constant(5.0)add=tf.add(input2,input3)mul=tf.multiply(input1,add)with tf.Session() as sess: res...原创 2020-10-15 20:02:43 · 89 阅读 · 0 评论