
机器学习
搓衣板的正义
越努力,约幸运!
展开
-
TensorFlow 入门---Softmax Regression识别手写数字
TensorFlow入门的第一个程序TensorFlow是谷歌深度学习的框架,暑假培训对框架有了初步的认识,也对人工智能有了新的认识,通过这个手写数字的识别,对机器学习有了新的认识,机器学习:即对大量数据(样本)进行分析,对样本进行降维,通过不同的算法提取特征值,通过大量数据对模型进行拟合训练,类似在 y = w *x +b 中,通过利用feed_dict 对占位符x与y_ 进行赋值 ,模...原创 2019-07-20 18:50:41 · 213 阅读 · 0 评论 -
TensorFlow 入门---二分类问题
import tensorflow as tffrom numpy.random import RandomStatebatch_size = 8#随机生成两个变量,服从正态分布w1 = tf.Variable(tf.random_normal([2,3],stddev=1,seed = 1))w2 = tf.Variable(tf.random_normal([3,1],s...原创 2019-07-31 15:41:10 · 341 阅读 · 0 评论 -
AttributeError: module 'tensorflow' has no attribute 'select'
记录:在学习tf.select()函数与tf.greater()函数时出现错误:AttributeError: module 'tensorflow' has no attribute 'select'后来查询时因为API 发生改变,tf.select() 改为了 tf.where()参考:https://blog.youkuaiyun.com/accum...原创 2019-08-01 16:31:27 · 899 阅读 · 0 评论 -
Opencv ---- 图像处理+生成xml文件(数据集处理)
import cv2import osimport numpy as npfrom xml.etree.ElementTree import ElementTreefrom xml.etree.ElementTree import Elementfrom xml.etree.ElementTree import SubElementimage_path = 'img/'...原创 2019-08-05 21:27:36 · 2000 阅读 · 0 评论 -
损失函数对模型训练结果的影响
import tensorflow as tffrom numpy.random import RandomStatebatch_size = 8#定义两个占位符,表示输入的x 与 正确的yx = tf.placeholder(tf.float32,shape=(None ,2),name="x-input")y_ = tf.placeholder(tf.float32,shap...原创 2019-08-01 17:30:23 · 5171 阅读 · 0 评论