TensorFlow 卷积神经网络系列案例(1):猫狗识别 https://blog.csdn.net/duan_zhihua/article/details/81156693
TensorFlow 系列案例(2):自然语言处理-TensorFlow + Word2Vechttps://blog.csdn.net/duan_zhihua/article/details/81257323
TensorFlow 系列案例(3): 使用TensorFlow DNN分类器对数据进行分类
步骤:
- 分别读入iris训练数据集、测试数据集。
- 使用tf.contrib.learn.DNNClassifier算法对数据集进行分类。
- 使用classifier.fit训练模型。
- 评估分类准确度。
- 使用新的样本数据进行预测。
iris_training.csv训练数据如下:第一行为标题,第一个数字120为数据的行数,第二个数字4为特征维度。
120,4,setosa,versicolor,virginica
6.4,2.8,5.6,2.2,2
5.0,2.3,3.3,1.0,1
4.9,2.5,4.5,1.7,2
4.9,3.1,1.5,0.1,0
5.7,3.8,1.7,0.3,0
4.4,3.2,1.3,0.2,0
5.4,3.4,1.5,0.4,0
6.9,3.1,5.1,2.3,2
6.7,3.1,4.4,1.4,1
5.1,3.7,1.5,0.4,0
5.2,2.