猫狗大战是比较经典的机器学习案例,前几天体验了一番,来记录一下

1.图片准备

首先是准备训练的图片

链接:https://pan.baidu.com/s/1ht1HIuw 密码:aw9s

2.开始训练

需要的时间可能比较长

注:可能出现image RGB values must be in the 0..1 range.的错误

可以尝试修改下面的代码,将img[j,:,:,:]数组的值调到0到1之间,

0.1 * old_img + 0.5 对图片显示影响较小,不过可能会偏移;

0.2 * abs(old_img)对图片位置影响较小,不过可能显示会失真。

可参考:https://stackoverflow.com/questions/47318871/valueerror-floating-point-image-rgb-values-must-be-in-the-0-1-range-while-usi

3.测试训练

再找几张猫狗图片进行测试

test.py

参考:

TensorFlow——训练自己的数据(一)数据处理:http://blog.csdn.net/xinyu3307/article/details/74643019
TensorFlow——训练自己的数据(二)模型设计:http://blog.csdn.net/xinyu3307/article/details/74943033
TensorFlow——训练自己的数据(三)模型训练:http://blog.csdn.net/xinyu3307/article/details/74979842
TensorFlow——训练自己的数据(四)模型测试:http://blog.csdn.net/xinyu3307/article/details/75008458

用自己的图片数据做tensorflow深度学习:http://blog.csdn.net/baidu_23263735/article/details/74177831
github地址:https://github.com/kevin28520/My-TensorFlow-tutorials/tree/master/01%20cats%20vs%20dogs

最新文章

  1. 漫谈单点登录(SSO)(淘宝天猫)
  2. 【逐步完善】MySql索引相关
  3. PHP函数的实现原理及性能分析
  4. POJ 3694 tarjan 桥+lca
  5. PHP 增删改查 import!!
  6. engine的工具中实现Snapping(捕捉)
  7. require.js的使用的坑!
  8. html5 中常用的标签和属性
  9. 关于新装ubuntu系统update失败和build-essential失败的解决办法
  10. 621 - Secret Research
  11. 在ZendStudio中增加新的php模板
  12. 关于百度地图js api的getCurrentPosition定位不准确的解决方法
  13. The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)
  14. vue.js学习系列-第二篇
  15. python基础-----类和实例
  16. Python 中的垃圾回收机制--备忘
  17. 【emWin】例程二十八:窗口对象——Menu
  18. Appium+python自动化4-元素定位uiautomatorviewer
  19. 为你的网站加上SSL,可以使用HTTPS进行访问
  20. tomcat主页打不开,tomcat manager 配置,Failed to start component [StandardEngine[Catalina].

热门文章

  1. Intent 介绍
  2. css - inline\inline-block\block
  3. 浅谈Android移动开发程序员的职业发展之路
  4. [C++设计模式] command 命令模式
  5. iOS开发-重写description方法,自定义控制台(log)信息
  6. C#导出Excel和相关打印设置
  7. CREATE SEQUENCE添加自增序列及NEXT VALUE FOR返回序列号
  8. 从‘void*’到‘int’的转换损失精度
  9. python 属性 property、getattr()、setattr()详解
  10. deepin下安装python的Tkinter库