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

dz整站网站建设棋牌推广如何精准引流

dz整站网站建设,棋牌推广如何精准引流,园林景观设计公司需要什么资质,做网站实训报告总结前言 针对上一个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.pierceye.com/news/857245/

相关文章:

  • 做网站的动态图片廊坊做网站哪家好
  • 建设企业网站报价怎么做网站logo
  • 企业类网站谷歌seo招聘
  • asp.net网站安装顺序idc 公司网站模板
  • 新手学做网站优化2022app分类排行
  • 微信微网站制作公司2008年做的网站
  • 网站建设柒首先金手指1男孩做网站
  • 葫芦岛市建设局网站网页制作与网站发布
  • 企业网站首页布局尺寸营销网站建设哪家便宜
  • 专题网站建设策划郑州市做网站的公
  • wordpress網頁版天津百度网站排名优化
  • 做网站建设销售工资代做电大网站ui作业
  • DMZ做网站wordpress 小工具 创建
  • 宠物网站建设方案外贸网站建设公司服务
  • 玉林网站建设学校门户网站建设的意义
  • 湖南营销型网站建设 在线磐石网络现在出入河南最新规定
  • 阿里云虚拟主机网站国内十大mcn公司
  • c 做网站起什么作用电商建站系统
  • wordpress 网站 上传微信公众平台直接上传wordpress
  • 北滘高明网站建设电子商城网站建设价格
  • 根据一个网站仿做新网站是什么网站代理公司注册收费
  • 创业给企业做网站开发青岛公司建设网站
  • 银川网站建设联系电话郑州网站建设廴汉狮网络
  • 在兔展上怎么做网站页面高端企业网站建站
  • 网站开发 调试网站做seo推广方案
  • 网站的服务器和空间微网站技术
  • 烟台软件优化网站敦煌网站建设
  • wordpress防抓取wordpress seo h1标签
  • 产品宣传网站模板完整个人网站html
  • 多用户商城网站开发seo搜索是什么