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.mzph.cn/news/141119.shtml

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

相关文章

帝国cms中如何让外部链接直接从新窗口打开页面

<?php if($bqr[isurl]) { ?> <a href"<?$bqsr[titleurl]?>" target"_blank"> <?php } else { ?> <a href"<?$bqsr[titleurl]?>"> <?php } ?>

2023最新最全【Adobe After Effection 2023】下载安装零基础教程【附安装包】

AE2023下载点这里 教学 1.鼠标右击【Ae2023(64bit)】压缩包选择&#xff08;win11系统需先点击“显示更多选项”&#xff09;【解压到 Ae2023(64bit)】。 2.打开解压后的文件夹&#xff0c;鼠标右击【Set-up】选择【以管理员身份运行】。 3.点击【文件夹图标】&#xff0c;…

DNS域名解析

目录 1.概述 1.1产生原因 1.2作用 1.3连接方式 1.4因特网的域名结构 1.4.1拓扑 1.4.2分类 1.4.3域名服务器类型划分 2. DNS域名解析过程 2.1分类 2.2解析图 2.2.2过程分析 3.搭建DNS域名解析服务器 3.1.概述 3.2安装软件 3.3bind服务中三个关键文件 3.4主配置…

PNAS | 蛋白质结构预测屈服于机器学习

今天为大家介绍的是来自James E. Rothman的一篇短文。今年的阿尔伯特拉斯克基础医学研究奖表彰了AlphaFold的发明&#xff0c;这是蛋白质研究历史上的一项革命性进展&#xff0c;首次提供了凭借序列信息就能够准确预测绝大多数蛋白质的三维氨基酸排列的实际能力。这一非凡的成就…

堆排序(大根堆、小根堆)

参考视频&#xff1a; 1、数据结构&#xff0c;小根堆的调整&#xff01;必须熟练掌握&#xff01; 2、数据结构建堆筛选输出最小值 | 计算机软件考研期末知识点2

Scikit-LLM:一款大模型与 scikit-learn 完美结合的工具!

Scikit-LLM 是文本分析领域的一项重大变革&#xff0c;它将像 ChatGPT 这样强大的语言模型与 scikit-learn 相结合&#xff0c;提供了一套无与伦比的工具包&#xff0c;用于理解和分析文本。 有了 scikit-LLM&#xff0c;你可以发现各种类型的文本数据中的隐藏模式、情感和上下…

【STM32】定时器+基本定时器

一、定时器的基本概述 1.软件定时器原理 原来我们使用51单片机的时候&#xff0c;是通过一个__nop()__来进行延时 我们通过软件的方式来进行延时功能是不准确的&#xff0c;受到很多不确定因素。 2.定时器原理&#xff1a;计数之间的比值 因为使用软件延时受到影响&#xff0c…

Spring中的循环依赖解决方案

前言&#xff1a;测试环境突发BeanCurrentlyInCreationException&#xff0c;导致后端服务启动失败&#xff0c;一看就是Spring的Bean管理中循环依赖。项目中存在Bean的循环依赖&#xff0c;是代码质量低下的表现。多数人寄希望于框架层来给擦屁股&#xff0c;造成了整个代码的…

大数据-玩转数据-Flume

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

开放领域对话系统架构

开放领域对话系统是指针对非特定领域或行业的对话系统&#xff0c;它可以与用户进行自由的对话&#xff0c;不受特定领域或行业的知识和规则的限制。开放领域对话系统需要具备更广泛的语言理解和生成能力&#xff0c;以便与用户进行自然、流畅的对话。 与垂直领域对话系统相比…

AIX5.3安装weblogic10.3

目录 1安装IBM JDK 1.6 2图形化准备 3安装weblogic 准备 4图形化界面安装 1安装IBM JDK 1.6 1.1检查操作系统 # oslevel 5.3.0.0 # bootinfo -y (显示AIX机器硬件是64位) 64 # bootinfo -K (显示AIX系统内核是64位) 64 因此&#xff0c;系统需要安装64位的jdk&#xff0c;…

JavaWeb Day09 Mybatis-基础操作01-增删改查

目录 环境准备 ①Emp.sql ②Emp.java 一、删除 ①Mapper层 ②测试类 ③预编译SQL&#xff08;查看mybatis日志&#xff09; 1.性能 2.安全 ④总结 二、新增 ①Mapper层 ②测试类 ③结果 ④新增&#xff08;主键返回&#xff09; 1.Mapper层 2.测试类 ⑤总结​…

上机4KNN实验4

目录 编程实现 kNN 算法。一、步骤二、实现代码三、总结知识1、切片2、iloc方法3、归一化4、MinMaxScale&#xff08;&#xff09;5、划分测试集、训练集6、KNN算法 .py 编程实现 kNN 算法。 1、读取excel表格存放的Iris数据集。该数据集有5列&#xff0c;其中前4列是条件属性…

Carla之语义分割及BoundingBox验证模型

参考&#xff1a; Carla系列——4.Cara模拟器添加语义分割相机&#xff08;Semantic segmentation camera&#xff09; Carla自动驾驶仿真五&#xff1a;opencv绘制运动车辆的boudingbox&#xff08;代码详解&#xff09; Carla官网Bounding Boxes Carla官网创建自定义语义标签…

【QT】飞机大战

0 项目简介 飞机大战是我们大家所熟知的一款小游戏&#xff0c;本教程就是教大家如何制作一款自己的飞机大战 首先我们看一下效果图 玩家控制一架小飞机&#xff0c;然后自动发射子弹&#xff0c;如果子弹打到了飞下来的敌机&#xff0c;则射杀敌机&#xff0c;并且有爆炸的特…

隧道施工工艺流程vr线上虚拟展示成为产品3D说明书

行业内都知道&#xff0c;汽车生产的大部分都需要冲压加工来完成&#xff0c;因此汽车冲压工艺是汽车制造过程中的重要环节&#xff0c;传统的展示方式往往局限于二维图纸和实地操作&#xff0c;难以充分展现工艺的细节和流程。然而&#xff0c;随着技术的进步&#xff0c;汽车…

不同优化器的应用

简单用用&#xff0c;优化器具体参考 深度学习中的优化器原理(SGD,SGDMomentum,Adagrad,RMSProp,Adam)_哔哩哔哩_bilibili 收藏版&#xff5c;史上最全机器学习优化器Optimizer汇总 - 知乎 (zhihu.com) import numpy as np import matplotlib.pyplot as plt import torch # …

优秀智慧园区案例 - 中建科技产业园(中建·光谷之星),万字长文解析先进智慧园区建设方案经验

一、项目背景 中建科技产业园&#xff08;中建光谷之星&#xff09;&#xff0c;位于武汉光谷中心城、中国&#xff08;湖北&#xff09;自贸试验区武汉片区双核心区&#xff0c;光谷发展主轴高新大道北侧&#xff0c;建筑面积108万平米&#xff0c;是中建三局“中建之星”和“…

设计模式—结构型模式之代理模式

设计模式—结构型模式之代理模式 代理模式(Proxy Pattern) ,给某一个对象提供一个代理&#xff0c;并由代理对象控制对原对象的引用,对象结构型模式。 静态代理 比如我们有一个直播平台&#xff0c;提供了直播功能&#xff0c;但是如果不进行美颜&#xff0c;可能就比较冷清…

Adobe Photoshop 2020给证件照换底

1.导入图片 2.用魔法棒点击图片 3.点选择&#xff0c;反选 4.选择&#xff0c;选择并遮住 5.用画笔修饰证件照边缘 6. 7.更换要换的底的颜色 8.新建图层 9.使用快捷键altdelete键填充颜色。 10.移动图层&#xff0c;完成换底。