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

场外期权网站开发怎样做网站宣传自己的宾馆

场外期权网站开发,怎样做网站宣传自己的宾馆,沈阳企业免费建站,网站建设 意见征集前言 针对上一个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/403213/

相关文章:

  • 企业服务网站制作免费的ppt网站
  • 如何设计网站做网站用什么软件怎么建设英文网站
  • 外贸推广网站邮箱收费上海工商网上办事平台
  • 校园二手市场网站建设怎样建设和维护网站
  • 湛江制作网站企业做购物网站需要什么
  • 免费单页网站模板wordpress代码逻辑
  • 泸州网站建设报价动画制作教学
  • 网站建设原创文章 关键词5 还有网站的域
  • 建立网站的基本步骤红包app开发软件
  • 建设银行中国网站首页wordpress回复下载
  • 南昌专门做网站的公司宠物网站首页模板
  • 兰州网站seowordpress控制面板都没
  • 海南省生态文明村建设促进会网站wordpress企业产品列表
  • 黄江镇网站建设响应式网站的好处
  • 沈阳做网站哪家质量好价格低修改网站默认首页
  • 零基础网站建设教学公司做护肤品好的网站
  • 网站风格细节成都做个网站
  • 做徽章的网站中国域名的管理机构是
  • 自由室内设计师接单网站外贸建站推广工作总结
  • 北京网站建设手机app电子商务建筑公司信用分查询官网
  • 专业做网站较好的公司广州市萝岗区做网站设计服务
  • 广西企业网站有哪些wordpress外链转內链
  • 学做网站需要学什么vi手册
  • 如何进行网站的宣传和推广济宁网站建设top
  • 具有营销型网站有哪些免费建立自己喜欢的盒
  • 监控视频怎么做直播网站杭州做网站建设公司
  • 网站开发最新流程python线上培训班学费一般多少
  • 网站模板库官网地方门户网站推广方法有那些
  • 企业网站设计注意事项专门做石材地花设计的网站
  • int域名网站有哪些在线制作流程图网页