caffe搭建squeezenet网络的整套工程

之前用pytorch构建了squeezenet,个人觉得pytorch是最好用的,但是有的工程就是需要caffe结构的,所以本篇也用caffe构建一个squeezenet网络。

数据处理

首先要对数据进行处理,跟pytorch不同,pytorch读取数据只需要给数据集所在目录即可直接从中读取数据,而caffe需要一个包含每张图片的绝对路径以及所在类别的txt文件,从中读取数据。写一个生成次txt文件的脚本:

import os
import randomfolder = 'cotta'  # 数据集目录相对路径
names = os.listdir(folder)f1 = open('/train_txt/train_cotta.txt', 'a')  # 生成的txt地址
f2 = open('/train_txt/test_water_workcloth.txt', 'a')for name in names:imgnames = os.listdir(folder + '/' + name)random.shuffle(imgnames)numimg = len(imgnames)for i in range(numimg):f1.write('%s %s\n' % (folder + '/' + name + '/' + imgnames[i], name[0]))# if i < int(0.9*numimg):#     f1.write('%s %s\n'%(folder + '/' + name + '/' + imgnames[i], name[0]))# else:#     f2.write('%s %s\n'%(folder + '/' + name + '/' + imgnames[i], name[0]))
# f2.close()
f1.close()

数据集的目录也要跟pytorch的一致,一个类的数据放在一个目录中,目录名为类名。且脚本与该目录同级。
运行脚本后生成的txt内容如下:

/cotta/0_other/0_1_391_572_68_68.jpg 0
/cotta/1_longSleeves/9605_1_5_565_357_82_70.jpg 1
/cotta/2_cotta/713_0.99796_1_316_162_96_87.jpg 2
......
图片相对路径 图片所属类别

网络结构配置文件

trainval.prototxt

layer {name: "data"type: "ImageData"top: "data"top: "label"transform_param {mirror: truecrop_size: 96}image_data_param {source: "/train_txt/train_cotta.txt"   # 生成的txt的相对路径root_folder: "/data/"   # 存放数据集目录的路径batch_size: 64shuffle: truenew_height: 96new_width: 96}}
layer {name: "conv1"type: "Convolution"bottom: "data"top: "conv1"convolution_param {num_output: 96kernel_size: 3stride: 1pad: 1weight_filler {type: "xavier"}}
}layer {  name: "BatchNorm1"  type: "BatchNorm" bottom: "conv1"  top: "BatchNorm1"   
}layer {name: "relu_conv1"type: "ReLU"bottom: "BatchNorm1"top: "BatchNorm1"
}
layer {name: "pool1"type: "Pooling"bottom: "BatchNorm1"top: "pool1"pooling_param {pool: MAXkernel_size: 2stride: 2}
}
layer {name: "fire2/squeeze1x1"type: "Convolution"bottom: "pool1"top: "fire2/squeeze1x1"convolution_param {num_output: 16kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire2/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire2/squeeze1x1"  top: "fire2/bn_squeeze1x1"   
}layer {name: "fire2/relu_squeeze1x1"type: "ReLU"bottom: "fire2/bn_squeeze1x1"top: "fire2/bn_squeeze1x1"
}
layer {name: "fire2/expand1x1"type: "Convolution"bottom: "fire2/bn_squeeze1x1"top: "fire2/expand1x1"convolution_param {num_output: 64kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire2/bn_expand1x1"  type: "BatchNorm" bottom: "fire2/expand1x1"  top: "fire2/bn_expand1x1"   
}layer {name: "fire2/relu_expand1x1"type: "ReLU"bottom: "fire2/bn_expand1x1"top: "fire2/bn_expand1x1"
}
layer {name: "fire2/expand3x3"type: "Convolution"bottom: "fire2/bn_expand1x1"top: "fire2/expand3x3"convolution_param {num_output: 64pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire2/bn_expand3x3"  type: "BatchNorm" bottom: "fire2/expand3x3"  top: "fire2/bn_expand3x3"   
}layer {name: "fire2/relu_expand3x3"type: "ReLU"bottom: "fire2/bn_expand3x3"top: "fire2/bn_expand3x3"
}
layer {name: "fire2/concat"type: "Concat"bottom: "fire2/bn_expand1x1"bottom: "fire2/bn_expand3x3"top: "fire2/concat"
}#fire2 ends: 128 channels
layer {name: "fire3/squeeze1x1"type: "Convolution"bottom: "fire2/concat"top: "fire3/squeeze1x1"convolution_param {num_output: 16kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire3/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire3/squeeze1x1"  top: "fire3/bn_squeeze1x1"   
}layer {name: "fire3/relu_squeeze1x1"type: "ReLU"bottom: "fire3/bn_squeeze1x1"top: "fire3/bn_squeeze1x1"
}
layer {name: "fire3/expand1x1"type: "Convolution"bottom: "fire3/bn_squeeze1x1"top: "fire3/expand1x1"convolution_param {num_output: 64kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire3/bn_expand1x1"  type: "BatchNorm" bottom: "fire3/expand1x1"  top: "fire3/bn_expand1x1"   
}layer {name: "fire3/relu_expand1x1"type: "ReLU"bottom: "fire3/bn_expand1x1"top: "fire3/bn_expand1x1"
}
layer {name: "fire3/expand3x3"type: "Convolution"bottom: "fire3/bn_expand1x1"top: "fire3/expand3x3"convolution_param {num_output: 64pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire3/bn_expand3x3"  type: "BatchNorm" bottom: "fire3/expand3x3"  top: "fire3/bn_expand3x3"   
}layer {name: "fire3/relu_expand3x3"type: "ReLU"bottom: "fire3/bn_expand3x3"top: "fire3/bn_expand3x3"
}
layer {name: "fire3/concat"type: "Concat"bottom: "fire3/bn_expand1x1"bottom: "fire3/bn_expand3x3"top: "fire3/concat"
}#fire3 ends: 128 channelslayer {name: "bypass_23"type: "Eltwise"bottom: "fire2/concat"bottom: "fire3/concat"top: "fire3_EltAdd"
}layer {name: "fire4/squeeze1x1"type: "Convolution"bottom: "fire3_EltAdd"top: "fire4/squeeze1x1"convolution_param {num_output: 32kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire4/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire4/squeeze1x1"  top: "fire4/bn_squeeze1x1"   
}layer {name: "fire4/relu_squeeze1x1"type: "ReLU"bottom: "fire4/bn_squeeze1x1"top: "fire4/bn_squeeze1x1"
}
layer {name: "fire4/expand1x1"type: "Convolution"bottom: "fire4/bn_squeeze1x1"top: "fire4/expand1x1"convolution_param {num_output: 128kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire4/bn_expand1x1"  type: "BatchNorm" bottom: "fire4/expand1x1"  top: "fire4/bn_expand1x1"   
}layer {name: "fire4/relu_expand1x1"type: "ReLU"bottom: "fire4/bn_expand1x1"top: "fire4/bn_expand1x1"
}
layer {name: "fire4/expand3x3"type: "Convolution"bottom: "fire4/bn_expand1x1"top: "fire4/expand3x3"convolution_param {num_output: 128pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire4/bn_expand3x3"  type: "BatchNorm" bottom: "fire4/expand3x3"  top: "fire4/bn_expand3x3"   
}layer {name: "fire4/relu_expand3x3"type: "ReLU"bottom: "fire4/bn_expand3x3"top: "fire4/bn_expand3x3"
}
layer {name: "fire4/concat"type: "Concat"bottom: "fire4/bn_expand1x1"bottom: "fire4/bn_expand3x3"top: "fire4/concat"
}
#fire4 ends: 256 channelslayer {name: "pool4"type: "Pooling"bottom: "fire4/concat"top: "pool4"pooling_param {pool: MAXkernel_size: 2stride: 2}
}
#fire4 ends: 256 channels / pooled
layer {name: "fire5/squeeze1x1"type: "Convolution"bottom: "pool4"top: "fire5/squeeze1x1"convolution_param {num_output: 32kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire5/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire5/squeeze1x1"  top: "fire5/bn_squeeze1x1"   
}layer {name: "fire5/relu_squeeze1x1"type: "ReLU"bottom: "fire5/bn_squeeze1x1"top: "fire5/bn_squeeze1x1"
}
layer {name: "fire5/expand1x1"type: "Convolution"bottom: "fire5/bn_squeeze1x1"top: "fire5/expand1x1"convolution_param {num_output: 128kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire5/bn_expand1x1"  type: "BatchNorm" bottom: "fire5/expand1x1"  top: "fire5/bn_expand1x1"   
}layer {name: "fire5/relu_expand1x1"type: "ReLU"bottom: "fire5/bn_expand1x1"top: "fire5/bn_expand1x1"
}
layer {name: "fire5/expand3x3"type: "Convolution"bottom: "fire5/bn_expand1x1"top: "fire5/expand3x3"convolution_param {num_output: 128pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire5/bn_expand3x3"  type: "BatchNorm" bottom: "fire5/expand3x3"  top: "fire5/bn_expand3x3"   
}layer {name: "fire5/relu_expand3x3"type: "ReLU"bottom: "fire5/bn_expand3x3"top: "fire5/bn_expand3x3"
}
layer {name: "fire5/concat"type: "Concat"bottom: "fire5/bn_expand1x1"bottom: "fire5/bn_expand3x3"top: "fire5/concat"
}#fire5 ends: 256 channels
layer {name: "bypass_45"type: "Eltwise"bottom: "pool4"bottom: "fire5/concat"top: "fire5_EltAdd"
}layer {name: "fire6/squeeze1x1"type: "Convolution"bottom: "fire5_EltAdd"top: "fire6/squeeze1x1"convolution_param {num_output: 48kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire6/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire6/squeeze1x1"  top: "fire6/bn_squeeze1x1"   
}layer {name: "fire6/relu_squeeze1x1"type: "ReLU"bottom: "fire6/bn_squeeze1x1"top: "fire6/bn_squeeze1x1"
}
layer {name: "fire6/expand1x1"type: "Convolution"bottom: "fire6/bn_squeeze1x1"top: "fire6/expand1x1"convolution_param {num_output: 192kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire6/bn_expand1x1"  type: "BatchNorm" bottom: "fire6/expand1x1"  top: "fire6/bn_expand1x1"   
}layer {name: "fire6/relu_expand1x1"type: "ReLU"bottom: "fire6/bn_expand1x1"top: "fire6/bn_expand1x1"
}
layer {name: "fire6/expand3x3"type: "Convolution"bottom: "fire6/bn_expand1x1"top: "fire6/expand3x3"convolution_param {num_output: 192pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire6/bn_expand3x3"  type: "BatchNorm" bottom: "fire6/expand3x3"  top: "fire6/bn_expand3x3"   
}layer {name: "fire6/relu_expand3x3"type: "ReLU"bottom: "fire6/bn_expand3x3"top: "fire6/bn_expand3x3"
}
layer {name: "fire6/concat"type: "Concat"bottom: "fire6/bn_expand1x1"bottom: "fire6/bn_expand3x3"top: "fire6/concat"
}
#fire6 ends: 384 channelslayer {name: "fire7/squeeze1x1"type: "Convolution"bottom: "fire6/concat"top: "fire7/squeeze1x1"convolution_param {num_output: 48kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire7/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire7/squeeze1x1"  top: "fire7/bn_squeeze1x1"   
}layer {name: "fire7/relu_squeeze1x1"type: "ReLU"bottom: "fire7/bn_squeeze1x1"top: "fire7/bn_squeeze1x1"
}
layer {name: "fire7/expand1x1"type: "Convolution"bottom: "fire7/bn_squeeze1x1"top: "fire7/expand1x1"convolution_param {num_output: 192kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire7/bn_expand1x1"  type: "BatchNorm" bottom: "fire7/expand1x1"  top: "fire7/bn_expand1x1"   
}layer {name: "fire7/relu_expand1x1"type: "ReLU"bottom: "fire7/bn_expand1x1"top: "fire7/bn_expand1x1"
}
layer {name: "fire7/expand3x3"type: "Convolution"bottom: "fire7/bn_expand1x1"top: "fire7/expand3x3"convolution_param {num_output: 192pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire7/bn_expand3x3"  type: "BatchNorm" bottom: "fire7/expand3x3"  top: "fire7/bn_expand3x3"   
}layer {name: "fire7/relu_expand3x3"type: "ReLU"bottom: "fire7/bn_expand3x3"top: "fire7/bn_expand3x3"
}
layer {name: "fire7/concat"type: "Concat"bottom: "fire7/bn_expand1x1"bottom: "fire7/bn_expand3x3"top: "fire7/concat"
}
#fire7 ends: 384 channels
layer {name: "bypass_67"type: "Eltwise"bottom: "fire6/concat"bottom: "fire7/concat"top: "fire7_EltAdd"
}layer {name: "fire8/squeeze1x1"type: "Convolution"bottom: "fire7_EltAdd"top: "fire8/squeeze1x1"convolution_param {num_output: 64kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire8/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire8/squeeze1x1"  top: "fire8/bn_squeeze1x1"   
}layer {name: "fire8/relu_squeeze1x1"type: "ReLU"bottom: "fire8/bn_squeeze1x1"top: "fire8/bn_squeeze1x1"
}
layer {name: "fire8/expand1x1"type: "Convolution"bottom: "fire8/bn_squeeze1x1"top: "fire8/expand1x1"convolution_param {num_output: 256kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire8/bn_expand1x1"  type: "BatchNorm" bottom: "fire8/expand1x1"  top: "fire8/bn_expand1x1"   
}layer {name: "fire8/relu_expand1x1"type: "ReLU"bottom: "fire8/bn_expand1x1"top: "fire8/bn_expand1x1"
}
layer {name: "fire8/expand3x3"type: "Convolution"bottom: "fire8/bn_expand1x1"top: "fire8/expand3x3"convolution_param {num_output: 256pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire8/bn_expand3x3"  type: "BatchNorm" bottom: "fire8/expand3x3"  top: "fire8/bn_expand3x3"   
}layer {name: "fire8/relu_expand3x3"type: "ReLU"bottom: "fire8/bn_expand3x3"top: "fire8/bn_expand3x3"
}
layer {name: "fire8/concat"type: "Concat"bottom: "fire8/bn_expand1x1"bottom: "fire8/bn_expand3x3"top: "fire8/concat"
}
#fire8 ends: 512 channelslayer {name: "pool8"type: "Pooling"bottom: "fire8/concat"top: "pool8"pooling_param {pool: MAXkernel_size: 2stride: 2}
}
#fire8 ends: 512 channels
layer {name: "fire9/squeeze1x1"type: "Convolution"bottom: "pool8"top: "fire9/squeeze1x1"convolution_param {num_output: 64kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire9/bn_squeeze1x1"  type: "BatchNorm" bottom: "fire9/squeeze1x1"  top: "fire9/bn_squeeze1x1"   
}layer {name: "fire9/relu_squeeze1x1"type: "ReLU"bottom: "fire9/bn_squeeze1x1"top: "fire9/bn_squeeze1x1"
}
layer {name: "fire9/expand1x1"type: "Convolution"bottom: "fire9/bn_squeeze1x1"top: "fire9/expand1x1"convolution_param {num_output: 256kernel_size: 1weight_filler {type: "xavier"}}
}layer {  name: "fire9/bn_expand1x1"  type: "BatchNorm" bottom: "fire9/expand1x1"  top: "fire9/bn_expand1x1"   
}layer {name: "fire9/relu_expand1x1"type: "ReLU"bottom: "fire9/bn_expand1x1"top: "fire9/bn_expand1x1"
}
layer {name: "fire9/expand3x3"type: "Convolution"bottom: "fire9/bn_expand1x1"top: "fire9/expand3x3"convolution_param {num_output: 256pad: 1kernel_size: 3weight_filler {type: "xavier"}}
}layer {  name: "fire9/bn_expand3x3"  type: "BatchNorm" bottom: "fire9/expand3x3"  top: "fire9/bn_expand3x3"   
}layer {name: "fire9/relu_expand3x3"type: "ReLU"bottom: "fire9/bn_expand3x3"top: "fire9/bn_expand3x3"
}
layer {name: "fire9/concat"type: "Concat"bottom: "fire9/bn_expand1x1"bottom: "fire9/bn_expand3x3"top: "fire9/concat"
}
#fire9 ends: 512 channelslayer {name: "conv10_new"type: "Convolution"bottom: "fire9/concat"top: "conv10"convolution_param {num_output: 3kernel_size: 1weight_filler {type: "gaussian"mean: 0.0std: 0.01}}
}layer {name: "pool10"type: "Pooling"bottom: "conv10"top: "pool10"pooling_param {pool: AVEglobal_pooling: true}
}# loss, top1, top5
layer {name: "loss"type: "SoftmaxWithLoss"bottom: "pool10"bottom: "label"top: "loss"include {
#    phase: TRAIN}
}
layer {name: "accuracy"type: "Accuracy"bottom: "pool10"bottom: "label"top: "accuracy"#include {#  phase: TEST#}
}

在最后一层卷积层conv10中的num_output修改类别数量。

模型超参配置文件

solver.prototxt

test_iter: 2000 #not subject to iter_size
test_interval: 1000000
# base_lr: 0.0001
base_lr: 0.005       # 学习率
display: 40
# max_iter: 600000
max_iter: 200000    # 迭代数
iter_size: 2 #global batch size = batch_size * iter_size
lr_policy: "poly"
power: 1.0 #linearly decrease LR
momentum: 0.9
weight_decay: 0.0002
snapshot: 10000     # 每多少次迭代保存一个模型
snapshot_prefix: "/data/zxc/classfication/model/model_cotta/cotta_"   # 模型保存路径
solver_mode: GPU
random_seed: 42
net: "./trainNets_drive/trainval.prototxt"   # 网络结构配置文件的路径 
test_initialization: false
average_loss: 40
  • max_iter:caffe用的是迭代数而不是pytorch的轮数。pytorch中训练完全部的训练集为一轮,而caffe中训练完一个batch_size的数据为一个迭代。如果想要等价与轮数的话,一轮就等于:len(train_data) / batch_size。如果有余数就要看pytorch里的dataloader里面设置舍去还是为一个batch,如果舍去就是向下取整,如果不舍去就是向上取整;
  • snapshot_prefix:最后一部分为每个保存模型的前缀,如图:
    在这里插入图片描述

运行命令

将运行命令写入bash文件中:
train.sh

/home/seg/anaconda3/envs/zxc/bin/caffe train -gpu 1 -solver ./solvers/solver_3.prototxt -weights=/data/classfication/model/model_cotta/cotta__iter_200000.caffemodel 2>&1 | tee log_3_4_class.txt 
  • -gpu:选择哪块卡,如果就一块就是0;
  • -solver:后面跟网络超参配置文件路径;
  • -weights:后面跟预训练模型,可以用官方给的squeezenet的caffe版本的预训练模型,我这里是训练中断从断点继续训练

编写完成后source activate 环境名称进入source环境,然后source train.sh运行bash文件就能开始训练。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/190712.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【C++】类和对象(2)--构造函数

目录 一 概念 二 构造函数特性 三 默认构造函数 一 概念 对于以下Date类&#xff1a; class Date { public:void Init(int year, int month, int day){_year year;_month month;_day day;}void Print(){cout << _year << "-" << _month <…

Qt贝塞尔曲线

目录 引言核心代码基本表达绘制曲线使用QEasingCurve 完整代码 引言 贝塞尔曲线客户端开发中常见的过渡效果&#xff0c;如界面的淡入淡出、数值变化、颜色变化等等。为了能够更深的了解地理解贝塞尔曲线&#xff0c;本文通过Demo将贝塞尔曲线绘制出来&#xff0c;如下所示&am…

DevChat:开发者专属的基于IDE插件化编程协助工具

DevChat&#xff1a;开发者专属的基于IDE插件化编程协助工具 一、DevChat 的介绍1.1 DevChat 简介1.2 DevChat 优势 二、DevChat 在 VSCode 上的使用2.1 安装 DevChat2.2 注册 DevChat2.3 使用 DevChat 三、DevChat 的实战四、总结 一、DevChat 的介绍 在AI浪潮的席卷下&#x…

基于开源项目OCR做一个探究(chineseocr_lite)

背景&#xff1a;基于图片识别的技术有很多&#xff0c;应用与各行各业&#xff0c;我们公司围绕电子身份证识别自动录入需求开展&#xff0c;以下是我的研究心得 技术栈&#xff1a;python3.6&#xff0c;chineseocr_lite的onnx推理 环境部署&#xff1a;直接上截图&#xff…

c语言-数据结构-栈和队列的实现和解析

目录 一、栈 1、栈的概念 1.2 栈的结构 2、栈的创建及初始化 3、压栈操作 4、出栈操作 5、显示栈顶元素 6、显示栈空间内元素的总个数 7、释放栈空间 8、测试栈 二、队列 1、队列的概念 1.2 队列的结构 2、队列的创建及初始化 3、入队 4、出队 5、显示队头、队…

在Spring Boot中使用JTA实现对多数据源的事务管理

了解事务的都知道&#xff0c;在我们日常开发中单单靠事务管理就可以解决绝大多数问题了&#xff0c;但是为啥还要提出JTA这个玩意呢&#xff0c;到底JTA是什么呢&#xff1f;他又是具体来解决啥问题的呢&#xff1f; JTA JTA&#xff08;Java Transaction API&#xff09;是…

CG Magic分享效果图中VRay的灯光设置分析

效果图制作中&#xff0c;一张图VRay效果图好不好看主要看灯光、材质、模型、相机、后期这五点。VRay的灯光设置来说是极为重要的。 VRay灯光设置不好&#xff0c;就会出现vray灯光颜色不能正常显示再或是vray的灯光不亮的问题。 vray的灯光怎么设置才能使效果图展现的更加真实…

LabVIEW中如何在网络上使用远程VI服务器

LabVIEW中如何在网络上使用远程VI服务器 如何在网络上使用远程VI服务器&#xff1f; 解答: 首先&#xff0c;需要在远程的计算机上打开一个在VI服务器上的LabVIEW应用程序的引用。这可以通过“Open ApplicationReference“函数实现。然后用“Open VI Reference”函数打开一个…

外贸开发信邮箱如何选?群发邮件有效技巧?

外贸开发信邮箱用哪种好&#xff1f;QQ邮箱群发邮件怎么发&#xff1f; 一个有效的外贸开发信邮箱可以帮助您建立联系、推销产品&#xff0c;并与潜在客户进行沟通。在本文中&#xff0c;蜂邮EDM将分享一些关于如何选择外贸开发信邮箱的建议&#xff0c;以确保您能够与全球客户…

大数据-玩转数据-Flume

一、Flume简介 Flume提供一个分布式的,可靠的,对大数据量的日志进行高效收集、聚集、移动的服务,Flume只能在Unix环境下运行。Flume基于流式架构,容错性强,也很灵活简单。Flume、Kafka用来实时进行数据收集,Spark、Flink用来实时处理数据,impala用来实时查询。二、Flume…

计算机视觉:使用opencv实现银行卡号识别

1 概述 1.1 opencv介绍 OpenCV是Open Source Computer Vision Library&#xff08;开源计算机视觉库&#xff09;的简称&#xff0c;由Intel公司在1999年提出建立&#xff0c;现在由Willow Garage提供运行支持&#xff0c;它是一个高度开源发行的计算机视觉库&#xff0c;可以…

ESP32 C3 smartconfig一键配网报错

AP配网 在调试我的esp32c3的智能配网过程中&#xff0c;发现ap配网使用云智能App是可以正常配置的。 切记用户如果在menu菜单里使能AP配网&#xff0c;默认SSID名字为adh_PK值_MAC后6位。用户可以修改这个apssid的键值&#xff0c;但是要使用云智能app则这个名字的开头必须为ad…

电源基础元件

文章目录 电源基础元件理想电压源理想电流源受控电源 电源基础元件 理想电压源 定义 其两端电压总能保持定值或一定的时间函数&#xff0c;其值与流过它的电流i无关的元件叫理想电压源 理想电压源的电压、电流关系 1.电源两端电压由电源本身决定&#xff0c;与外电路无关&…

windows安装nginx

一、下载安装Nginx 1、官网下载地址&#xff1a;nginx: download 2、下载教程&#xff1a;选择最新的Stable version&#xff08;稳定版本&#xff09;下载到本地 3、下载完成后&#xff0c;解压放入本地非中文的文件夹中&#xff1a; 4、启动nginx&#xff1a;切勿直接双击n…

2390 高校实验室预约系统JSP【程序源码+文档+调试运行】

摘要 本文介绍了一个高校实验室预约系统的设计和实现。该系统包括管理员、教师和学生三种用户&#xff0c;具有基础数据管理、学生管理、教师管理、系统公告管理、实验室管理、实验室预约管理和系统管理等模块。通过数据库设计和界面设计&#xff0c;实现了用户友好的操作体验…

taro(踩坑) npm run dev:weapp 微信小程序开发者工具预览报错

控制台报错信息&#xff1a; VM72:9 app.js错误: Error: module vendors-node_modules_taro_weapp_prebundle_chunk-JUEIR267_js.js is not defined, require args is ./vendors-node_modules_taro_weapp_prebundle_chunk-JUEIR267_js.js 环境&#xff1a; node 版本&#x…

Python数据容器(序列操作)

序列 1.什么是序列 序列是指&#xff1a;内容连续、有序。可以使用下标索引的一类数据容器 列表、元组、字符串。均可以视为序列 2.序列的常用操作 - 切片 语法&#xff1a;序列[起始下标:结束下标:步长]起始下标表示从何处开始&#xff0c;可以留空&#xff0c;留空视作从…

华为ensp:为vlan配置ip

配置对应vlan的ip vlan1 interface Vlanif 1 进入vlan1 ip address 192.168.1.254 24配置IP为192.168.1.254 子网掩码为24位 这样就配置上ip了 vlan2 interface Vlanif 2 ip address 192.168.2.254 24 vlan3 interface Vlanif 3 ip address 192.168.3.254 24 查看结果 …

JDK更换版本不生效问题

JDK版本更换 问题: 当本地电脑拥有多个版本jdk时, 切换jdk版本不生效 解决方案: 1.查看环境变量(高版本的jdk安装时自动注入环境变量) 2.将Path里面的jdk的bin配置上移到最上面 3.查看jdk版本, java -version 启动项目,显示如下使用了jdk17

【Python小程序】浮点矩阵加减法

一、内容简介 本文使用Python编写程序&#xff0c;实现2个m * n矩阵的加、减法。具体过程如下&#xff1a; 给定两个m*n矩阵A和B&#xff0c;返回A与B的和或差。 二、求解方法 将两个矩阵对应位置上的元素相加。 三、Python代码 import numpy as np# 用户输入两个矩阵的维…