当前位置: 首页 > news >正文

网站建设教育类旧式网站公司网站建设方案书怎么写

网站建设教育类旧式网站,公司网站建设方案书怎么写,长春网站制作可选源晟4,最全的ppt模板网站前言 针对上一个caffe文章留下的matlab手写数字识别的问题#xff0c;感谢caffe中文社区的 ghgzh 的提示#xff0c;原文请看#xff1a;caffe中文社区 第一步 手写图片的制作方法我就不说了#xff0c;直接把我自己画的几个数字放到云盘先#xff1a; 三通道图像以及…前言 针对上一个caffe文章留下的matlab手写数字识别的问题感谢caffe中文社区的 ghgzh 的提示原文请看caffe中文社区 第一步 手写图片的制作方法我就不说了直接把我自己画的几个数字放到云盘先 三通道图像以及转换所需代码链接http://pan.baidu.com/s/1gfqeCAR 密码88kk 转换后的灰度图像链接http://pan.baidu.com/s/1eSyohsY 密码zwum 【注意】如果你的手写数字是黑字白底最好反转成白字黑底毕竟mnist的数据集就是白字黑底 第二步 创建标签从零开始synset_words.txt如下 0 1 2 3 4 5 6 7 8 9 第三步 书写调用classfication demo的test文件 【重点】上一篇文章所留问题就是在这里解决的在图片输入网络之前也就是net.forwarad之前必须经过转置原理未知目前是感觉跟matlab和opencv读取图片的方法有关使用caffe.io.loadimage读取是按照BGR读取并且进行了旋转所以使用matlab时候必须进行同等处理详细原因在后面分析代码再说~~~ clear clc close all imimread(./binarybmp/5.bmp); figure;imshow(im);%显示图片 [scores, maxlabel] classification_demo(im, 0);%获取得分第二个参数0为CPU1为GPU scores maxlabelfigure;plot(scores);%画出得分情况 axis([0, 10, -0.1, 0.5]);%坐标轴范围 grid on %有网格fid fopen(synset_words.txt, r); i0; while ~feof(fid)ii1;lin fgetl(fid);lin strtrim(lin);if(imaxlabel)fprintf(the maxlabel of %d in label txt is %s\n,i,lin)breakend end 第四步 修改classification_demo如下 function [scores, maxlabel] classification_demo(im, use_gpu)if exist(../../caffe, dir)addpath(../..); elseerror(Please run this demo from caffe/matlab/demo); end% Set caffe mode if exist(use_gpu, var) use_gpucaffe.set_mode_gpu();gpu_id 0; % we will use the first gpu in this democaffe.set_device(gpu_id); elsecaffe.set_mode_cpu(); end% Initialize the network using BVLC CaffeNet for image classification % Weights (parameter) file needs to be downloaded from Model Zoo. model_dir ../../../examples/mnist/; net_model [model_dir lenet.prototxt]; net_weights [model_dir lenet_iter_10000.caffemodel]; phase test; % run with phase test (so that dropout isnt applied) if ~exist(net_weights, file)error(Please download CaffeNet from Model Zoo before you run this demo); end% Initialize a network net caffe.Net(net_model, net_weights, phase); % prepare oversampled input % input_data is Height x Width x Channel x Num tic;mean_data caffe.io.read_mean(../../../examples/mnist/mean.binaryproto);scale0.00390625;imdouble(im);im(im-mean_data)*scale;input_data {im}; toc;% do forward pass to get scores % scores are now Channels x Num, where Channels 1000 tic; % The net forward function. It takes in a cell array of N-D arrays % (where N 4 here) containing data of input blob(s) and outputs a cell % array containing data from output blob(s) scores net.forward(input_data); toc;scores scores{1}; scores mean(scores, 2); % take average scores over 10 crops[~, maxlabel] max(scores);% call caffe.reset_all() to reset caffe caffe.reset_all();说明一下修改的部分①模型文件调用的模型依旧是要注意deploy.prototxt与train_test .prototxt的区别在mnist实例中deploy.prototxt就是lenet.prototxt后者就是lenet_train_test.prototxt它俩分别是前者在识别期间调用一个是在训练及测试阶段调用。区别在于deploy文件前两层并无指定输入数据和测试数据的层最后一层中deploy使用的softmax的“pro”输出的是可能标签的概率而train_test使用的是softmax的“loss”用于指示每次训练的损失。 ②去掉了在cat 的那个classification_demo中的图片预处理中需要进行crops_data处理对图片进行分块的部分。在手写数字中的预处理处理在第三步中比较重要的一步图像转置外在classification_demo中需要进行零均值以及缩放两步骤。(注按照上一篇的训练文件我们已经更改了预处理步骤添加了均值计算这一过程在lenet_train_test1第一二层的 transform_param中可以看到) 这里附带一下我的deploy和train_test文件 deploy.prototxt文件链接http://pan.baidu.com/s/1pLPGf03 密码cqjy train_test.prototxt文件:链接http://pan.baidu.com/s/1kVM03DP 密码l83w 第五步 差不多结束了运行程序吧。我的测试结果如下
http://www.huolong8.cn/news/378668/

相关文章:

  • 博客网站开发利用数据库成都保洁公司
  • 做网站销售怎么开发客户网站的建立
  • 常州网站推广多少钱seo优化内页排名
  • php怎么做多个网站广东响应式网站建设平台
  • 自己制作一个网站济南网站seo厂家
  • 个人网站备案如何取名称wordpress前台加载谷歌字体
  • 温州网站制作优化网站配色
  • 怎么做会员自动售卡网站投资5万的小型加工厂
  • 网站公司怎么做的wordpress 主页文件
  • 嘉定制作企业网站百度广告语
  • wordpress下载站插件dede做网站地图
  • 怎么查看网站disallow有公网ip 如何做一网站
  • 免费网站网站制作平台WordPress游览器标签
  • 河南省水利建设管理处网站群晖官方WordPress套件
  • 主题 外贸网站 模板下载厦门云端企业网站建设
  • 常州网络公司联系方式什么是seo标题优化
  • 网站设计是不是会要用代码做智能建网站软件
  • 电商网站维护费用网站运营需要哪些人员
  • 运用photoshop设计网站首页软考网络工程师中级
  • 化工外贸网站建设怎么查设计的logo侵不侵权
  • 建立营销型网站2023年没必要学php了
  • 兰州市城乡和住房建设局网站淄博网站优化资讯
  • 阿里网站建设App开发重庆市建设工程信息网行业协会
  • 怎么在网站上建设投票统计商标设计图
  • 怎样找网站网络工程师自学难吗
  • 那个视频网站好如何在电子商务化平台上做企业网站推广
  • 外贸做企业什么网站建设做购物网站步骤
  • 免费外贸网站在线网站绑定别名好吗
  • 网站域名起名wordpress 搜索翻页
  • 公司招聘网站 哪个部门做单位网址怎么编