tensorflow
柳叶吴钩
叶底藏花一度,梦里踏雪几回
展开
-
基于TensorFlow的线性支持向量机
1、导入编程库。import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasets2、创建会话,加载数据sess = tf.Session()iris = datasets.load_iris()x_vals = np.array([...原创 2018-09-12 00:58:36 · 186 阅读 · 0 评论 -
基于Tensorflow的线性回归
1、导入必要的编程库,创建计算图,加载数据集import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasetssess = tf.Session()iris = datasets.load_iris()x_vals = np.array([x...原创 2018-09-10 01:41:00 · 181 阅读 · 0 评论 -
基于TensorFlow支持向量机
1、导入必要编程库import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasets2、创建会话,生成模拟数据sess = tf.Session()(x_vals, y_vals) = datasets.make_circles(n_s...原创 2018-09-13 00:15:00 · 646 阅读 · 0 评论 -
基于Tensorflow的戴明回归算法
1、戴明回归算法戴明回归最小化,求的是点到回归直线的距离。具体是最小化x值和y值两个方向的误差。2、Tensorflow实现戴明回归算法(1)导入编程库,创建会话等import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasetss...原创 2018-09-10 22:33:10 · 887 阅读 · 0 评论 -
基于Tensorflow实现多分类支持向量机
1、导入必要的编程库;import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasetssess = tf.Session()2、加载iris数据集并为每类分离目标值;iris = datasets.load_iris()x_vals = np....原创 2018-09-19 00:18:10 · 2084 阅读 · 3 评论 -
基于TensorFlow的单层神经网络
1、创建计算会话,导入必要的编程库。import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasetssess = tf.Session()2、加载Iris数据集iris = datasets.load_iris()x_vals = np.arr...原创 2018-09-24 16:49:22 · 236 阅读 · 0 评论 -
基于TensorFlow的非线性向量机
import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom sklearn import datasetssess = tf.Session()iris = datasets.load_iris()x_vals= np.array([[x[0], x[3]] for x in iris.da...原创 2018-09-15 00:43:05 · 209 阅读 · 0 评论 -
用TensorFlow基于最近邻域法实现图像识别
1、导入编程库import randomimport numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom PIL import Imagefrom tensorflow.examples.tutorials.mnist import input_data2、创建会话,加载数据集sess =...原创 2018-09-20 23:33:50 · 672 阅读 · 0 评论