当前位置: 首页 > 编程日记 > 正文

【AI】caffe使用步骤(三):编写求解文件solver.prototxt

【一】参考博客

caffe solver 配置详解:http://www.mamicode.com/info-detail-2620709.html
Caffe学习系列(7):solver及其配置:https://www.cnblogs.com/denny402/p/5074049.html

【二】solver求解文件详解

1、solver求解文件例子如下
net: "examples/resnet/train_test.prototxt"
test_iter: 100 
test_interval: 2000base_lr: 0.1
lr_policy: "multistep"
gamma: 0.1stepvalue: 16000
stepvalue: 24000
stepvalue: 28000
max_iter: 28000display: 100
momentum: 0.9
weight_decay: 0.0005
snapshot: 1000
snapshot_prefix: "examples/resnet/train_test"solver_mode: CPU
2、solver的配置参数详解,总共有42个
1> net

训练网络用的prototxt文件,该文件可能包含不止一个的测试网络,通常不与train_net和test_net同时定义;

2> test_iter

测试网络前向推理的迭代次数,注意每测试迭代一次是一个测试网络定义的batch size大小,test_iter 与 batch_size 的乘积应为整个测试集的大小;

3> test_interval

训练时每隔多少次迭代则进行一次测试,默认为0即每次训练完后都会进行一次测试,应该要配置该参数,否则训练速度超级慢;

4> test_compute_loss

测试时是否计算损失值,默认为假 false,通常用于 debug 分析用;

5> test_initialization

在第一次训练迭代之前先运行一次测试,用于确保内存够用和打印初始的loss值,默认为真 true;

6> base_lr

初始的学习率

7> display

训练迭代多少次后显示相关信息到终端,如果置0则不会有任何有效信息打印;

8> average_loss

显示上一次迭代平均损失值的间隔,默认为1,通常不设定;

9> max_iter

用于计算 lr_policy 学习率调整策略 为 poly 时的学习速率的变化

10> iter_size

用于多少个batch_size后再更新梯度,通常在GPU内存不足时用于扩展batch_size,真实的batch_size为iter_size*batch_size大小;

11> lr_policy

学习率调整策略,取值及说明如下

  • fixed:保持学习速率为初始学习速率 base_lr 不变.

  • step:如果设置为step,则还需要设置一个 stepsize,返回

    base_lr * gamma ^ (floor(iter / stepsize))
    

    其中iter表示当前的迭代次数,floor函数功能是向下取整。

  • exp:返回

    base_lr * gamma ^ iter
    

    iter为当前迭代次数

  • inv:如果设置为inv,还需要设置一个power,返回

    base_lr * (1 + gamma * iter) ^ (- power)
    
  • multistep:如果设置为multistep,则还需要设置一个 stepvalue。这个参数和step很相似,step是均匀等间隔变化,而multstep则是根据stepvalue值变化

  • poly:学习率进行多项式误差,返回

    base_lr * (1 - iter/max_iter) ^ (power)
    
  • sigmoid:学习率进行sigmod衰减,返回

     base_lr * ( 1/(1 + exp(-gamma * (iter - stepsize))))
    
12> gamma

用于计算学习率的参数,lr_policy 为step、exp、inv、sigmoid时会使用到;

13> power

用于计算学习率的参数,lr_policy 为inv、poly时会使用到;

14> momentum

上一次梯度值的权重,用来加权之前梯度方向对现在梯度下降方向的影响,一般取值在0.5–0.99之间。通常设为0.9,momentum可以让使用SGD的深度学习方法更加稳定以及快速。

15> weight_decay

权重衰减参数,用于防止模型过拟合;

16> regularization_type

正则化方式,默认为L2正则化,可选的有L0、L1及L2,用于防止模型过拟合;

17> stepsize

lr_policy 为“step”时,经过多少次训练迭代才会进行调整学习率;

18> stepvalue

lr_policy 为“multistep”时,经过多少次训练迭代会进行调整学习率,该参数可设置多个以用于多次学习率调整;

19> clip_gradients

限定梯度的最大值,用于防止梯度过大导致梯度爆炸;

20> snapshot

保存模型的间隔,即每隔多少次训练迭代保存一次模型快照,默认为0,即不保存;

21> snapshot_prefix

模型保存的路径及路径名,但无后缀扩展类型,如果不设定,则使用无扩展的prototxt路径和文件名来作为模型保存文件的路径和文件名;

22> snapshot_diff

是否保存梯度值,默认不保存,如果保存可帮助调试但会增大保存文件的大小;

23> snapshot_format

模型保存的类型,有“HDF5”和“BINARYPROTO”两种,默认为后者BINARYPROTO;

24> snapshot_after_train

默认为真,即训练后按照模型保存设定的参数来进行快照,否则直到训练结束都不会保存模型;

25> solver_mode

训练时使用CPU还是GPU,默认为GPU;

26> device_id

使用GPU时的设备id号,默认为0;

27> random_seed

随机种子,默认为-1,使用系统时钟作为随机种子;

28> type

优化算法选择。默认是SGD。共六种:SGD、AdaDelta、AdaGrad(Adaptive Gradient) 、Adam 、Nesterov、RMSprop

29> delta

当优化算法为 RMSProp、AdaGrad、AdaDelta及Adam 计算值为0时的最小限定值,用于防止分母为0等溢出错误;

30> momentum2

“Adam”优化器的权重参数;

31> rms_decay

“RMSProp”优化器的衰减参数,其计算方式为

MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)
32> debug_info

默认为假,如果置真,则会打印模型网络学习过程中的状态信息,可用于分析调试;

33> solver_type

同“type”,已弃用

34> layer_wise_reduce

用于并行化训练数据,默认为真;

35> weights

用于微调时,加载预训练模型,和caffe命令行参数“–weights”功能一样,如果命令行也有定义“–weights”则其优先级更高将会覆盖掉solver文件中该参数的配置,如果存在多个权重模型用于加载,可使用逗号进行分离表示;

36> net_param

内联的训练网络prototxt定义,可能定义有不止一个的测试网络,通常忽略;

37> train_net

训练网络用的prototxt文件,通常不与net同时定义;

38> test_net

测试网络用的prototxt文件,通常不与net同时定义;

39> train_net_param

内联的训练网络prototxt定义,通常忽略;

40> test_net_param

内联的训练网络prototxt定义,通常忽略;

41> train_state

训练状态定义,默认为TRAIN,否则按照模型网络prototxt定义的来运行;

42> test_state

测试状态定义,默认为TEST并在测试集上进行测试,否则按照模型网络prototxt定义的来运行;

【三】solver的配置参数官方说明

参见:caffe/src/caffe/proto/caffe.proto中message SolverParameter

// NOTE
// Update the next available ID when you add a new SolverParameter field.
// 在添加新的SolverParameter字段时更新下一个可用ID。
// SolverParameter next available ID: 43 (last added: weights)
message SolverParameter {//// Specifying the train and test networks 指定train和test网络//// Exactly one train net must be specified using one of the following fields: 必须使用下列字段之一指定一个 train 网络://     train_net_param, train_net, net_param, net// One or more test nets may be specified using any of the following fields: 一个或多个测试网可使用下列任何一项指定://     test_net_param, test_net, net_param, net// If more than one test net field is specified (e.g., both net and test_net are specified), // they will be evaluated in the field order given above: (1) test_net_param, (2) test_net, (3) net_param/net.// A test_iter must be specified for each test_net.// A test_level and/or a test_stage may also be specified for each test_net.//// 如果指定了多个测试网络字段(例如,同时指定了net和test_net),它们将按照上面给出的字段顺序进行计算:(1)test_net_param, (2) test_net, (3) net_param/net。// 必须为每个test_net指定一个test_iter。还可以为每个test_net指定test_level和/或test_stage。//// Proto filename for the train net, possibly combined with one or more test nets. train网络的原始文件名,可能与一个或多个测试网组合。optional string net = 24;// Inline train net param, possibly combined with one or more test nets. train网络内部参数,可能与一个或多个测试网相结合。optional NetParameter net_param = 25;optional string train_net = 1; // Proto filename for the train net.repeated string test_net = 2; // Proto filenames for the test nets.optional NetParameter train_net_param = 21; // Inline train net params.repeated NetParameter test_net_param = 22; // Inline test net params.// The states for the train/test nets. Must be unspecified or specified once per net.// By default, train_state will have phase = TRAIN, and all test_state's will have phase = TEST.// Other defaults are set according to the NetState defaults.// train/测试网的状态。必须在每个网络中指定或未指定一次。// 默认情况下,train_state将有phase = TRAIN,所有test_state的都将有phase = TEST。// 其他默认值是根据NetState默认值设置的。optional NetState train_state = 26;repeated NetState test_state = 27;// The number of iterations for each test net. 每个测试网络的迭代次数。repeated int32 test_iter = 3;// The number of iterations between two testing phases. 两次测试阶段之间的迭代次数。optional int32 test_interval = 4 [default = 0];optional bool test_compute_loss = 19 [default = false];// If true, run an initial test pass before the first iteration, ensuring memory availability and printing the starting value of the loss.// 如果为真,在第一次迭代之前运行一个初始测试通过,确保内存可用性并打印损失的初始值。optional bool test_initialization = 32 [default = true];optional float base_lr = 5; // The base learning rate// the number of iterations between displaying info. If display = 0, no info will be displayed.// 显示信息之间的迭代次数。如果display = 0,则不显示任何信息。optional int32 display = 6;// Display the loss averaged over the last average_loss iterations// 显示上次average_loss迭代的平均损失optional int32 average_loss = 33 [default = 1];optional int32 max_iter = 7; // the maximum number of iterations 最大迭代次数// accumulate gradients over `iter_size` x `batch_size` instances// 积累梯度 = `iter_size` x `batch_size`optional int32 iter_size = 36 [default = 1];// The learning rate decay policy. The currently implemented learning rate policies are as follows:// 学习率衰减政策。目前实施的学习率政策如下://    - fixed: always return base_lr.//    - step: return base_lr * gamma ^ (floor(iter / step))//    - exp: return base_lr * gamma ^ iter//    - inv: return base_lr * (1 + gamma * iter) ^ (- power)//    - multistep: similar to step but it allows non uniform steps defined by stepvalue//    - poly: the effective learning rate follows a polynomial decay, to be zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)//    - sigmoid: the effective learning rate follows a sigmod decay return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))//// where base_lr, max_iter, gamma, step, stepvalue and power are defined in the solver parameter protocol buffer, and iter is the current iteration.// 其中base_lr、max_iter、gamma、step、stepvalue和power定义在求解器参数协议缓冲区中,iter为当前迭代。optional string lr_policy = 8;optional float gamma = 9;  // The parameter to compute the learning rate.optional float power = 10; // The parameter to compute the learning rate.optional float momentum = 11; // The momentum value.optional float weight_decay = 12; // The weight decay.// regularization types supported: L1 and L2 controlled by weight_decay 支持正则化类型:L1和L2由 weight_decay 衰减控制optional string regularization_type = 29 [default = "L2"];// the stepsize for learning rate policy "step" 学习速率策略的步长“step”optional int32 stepsize = 13;// the stepsize for learning rate policy "multistep" 学习速率策略“多步”的步长repeated int32 stepvalue = 34;// Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm, whenever their actual L2 norm is larger.// 将clip_gradients设置为>= 0,以便在实际L2范数较大时将参数梯度剪切到该L2范数。optional float clip_gradients = 35 [default = -1];optional int32 snapshot = 14 [default = 0]; // The snapshot interval 快照时间间隔// The prefix for the snapshot.快照的前缀。// If not set then is replaced by prototxt file path without extension. 如果没有设置,则用不带扩展名的prototxt文件路径替换。// If is set to directory then is augmented by prototxt file name without extention. 如果将其设置为目录,则使用不带扩展名的prototxt文件名进行扩展。optional string snapshot_prefix = 15;// whether to snapshot diff in the results or not. Snapshotting diff will help debugging but the final protocol buffer size will be much larger.// 是否在结果中快照差异。快照差异将有助于调试,但最终协议缓冲区的大小将大得多。optional bool snapshot_diff = 16 [default = false];enum SnapshotFormat {HDF5 = 0;BINARYPROTO = 1;}optional SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];// the mode solver will use: 0 for CPU and 1 for GPU. Use GPU in default.enum SolverMode {CPU = 0;GPU = 1;}optional SolverMode solver_mode = 17 [default = GPU];// the device_id will that be used in GPU mode. Use device_id = 0 in default. device_id将在GPU模式下使用。默认情况下使用device_id = 0。optional int32 device_id = 18 [default = 0];// If non-negative, the seed with which the Solver will initialize the Caffe random number generator -- useful for reproducible results. Otherwise, (and by default) initialize using a seed derived from the system clock.// 如果非负,求解器将使用种子初始化Caffe随机数生成器——这对于可重现的结果非常有用。否则,(默认情况下)使用从系统时钟派生的种子初始化。optional int64 random_seed = 20 [default = -1];// type of the solver 求解器的类型optional string type = 40 [default = "SGD"];// numerical stability for RMSProp, AdaGrad and AdaDelta and Adam RMSProp、AdaGrad、AdaDelta和Adam的数值稳定性optional float delta = 31 [default = 1e-8];// parameters for the Adam solver Adam求解器的参数optional float momentum2 = 39 [default = 0.999];// RMSProp decay value RMSProp衰减值// MeanSquare(t) = rms_decay*MeanSquare(t-1) + (1-rms_decay)*SquareGradient(t)optional float rms_decay = 38 [default = 0.99];// If true, print information about the state of the net that may help with debugging learning problems.// 如果是true,打印有关网络状态的信息,这些信息可能有助于调试学习问题。optional bool debug_info = 23 [default = false];// If false, don't save a snapshot after training finishes. 如果为false,培训结束后不要保存快照。optional bool snapshot_after_train = 28 [default = true];// DEPRECATED: old solver enum types, use string insteadenum SolverType {SGD = 0;NESTEROV = 1;ADAGRAD = 2;RMSPROP = 3;ADADELTA = 4;ADAM = 5;}// DEPRECATED: use type instead of solver_typeoptional SolverType solver_type = 30 [default = SGD];// Overlap compute and communication for data parallel trainingoptional bool layer_wise_reduce = 41 [default = true];// Path to caffemodel file(s) with pretrained weights to initialize finetuning.// Tha same as command line --weights parameter for caffe train command.// If command line --weights parameter is specified, it has higher priority// and overwrites this one(s).// If --snapshot command line parameter is specified, this one(s) are ignored.// If several model files are expected, they can be listed in a one // weights parameter separated by ',' (like in a command string) or// in repeated weights parameters separately.// 使用预先训练的权重初始化finetuning的caffemodel文件的路径。repeated string weights = 42;
}

相关文章:

MySQL 8.0 Invisible Indexes 和 RDS 5.6 Invisible Indexes介绍

mysql 在8.0的时候支持了不可见索引,称为隐式索引 索引默认是可以的,控制索引的可见性可以使用Invisible,visible关键字作为create table,create index,alter table 来进行定义。RDS 5.6 Invisible Indexes 也是最近刚刚上线的功能。新购买实例目前已经支…

大有可为的“正则表达式”(二)

5.3. 基本和扩展正则表达式Unix支持两种的正则表达式的版本:(1)现代版本:扩展正则表达式(extended regular expression,ERE),属于IEEE1003.2标准,拥有比BRE更多的功能。…

【AI】caffe使用步骤(四):训练和预测

一、训练 1、直接训练 ./build/tools/caffe train --solverexamples/mnist/lenet_solver.prototxt ./build/tools/caffe train --solverexamples/mnist/lenet_solver.prototxt -gpu all //使用全部的gpu来训练2、采用微调funing-tuning训练法 ./build/tools/caffe train --s…

Github免费中文书《Go入门指南》,带你从零学Go | 极客头条

点击上方↑↑↑蓝字关注我们~「2019 Python开发者日」全日程揭晓,请扫码咨询 ↑↑↑作者 | 无闻整理 | Jane出品 | AI科技大本营(ID:rgznai100)【导语】Go(也称 Golang)是 Google 开发的一种静态强类型、编…

sql语句中having的作用是?

HAVING对由sum或其它集合函数运算结果的输出进行限制。比如,我们可能只希望看到Store_Information数据表中销售总额超过1500美圆的商店的信息,这时我们就需要使用HAVING从句。语法格式为: SELECT "column_name1", SUM("column…

微软重新释出MS10-015 解决蓝屏问题

微软于周二(3/2)重新释出MS10-015修补程序。由于先前使用者安装该程序时,若电脑中含有Alureon rootkit就会出现更新错误,因而微软也提醒使用者先行杀毒,并避免安装后可能造成的蓝屏画面。 MS10-015是微软在今年2月用来…

share_ptr_c++11

C智能指针 shared_ptr shared_ptr 是一个标准的共享所有权的智能指针, 允许多个指针指向同一个对象. 定义在 memory 文件中(非memory.h), 命名空间为 std. std::shared_ptr<int> sp1 std::make_shared<int>(10);std::shared_ptr<std::string> sp2 std::…

【Python】ubuntu14安装pycaffe环境:python2.7及依赖库

1、问题描述 ubuntu14自带的python2.7版本是python2.7.5&#xff0c;安装pycaffe环境时&#xff0c;出现错误&#xff0c;提示版本低。在bing上搜索源码安装python2.7.16的步骤&#xff0c;后续使用时&#xff0c;又报错&#xff0c;缺少SLL模块&#xff1a; Cant connect to…

周志华、张潼亲自辅导AI课程,DeeCamp 2019正式启动

4 月 8 日&#xff0c;创新工场对外宣布 DeeCamp 2019 人工智能训练营正式启动。 据介绍&#xff0c;DeeCamp 2019 将于 7 月 15 日至 8 月 23 日在北京、上海、南京、广州四地同时举办。今年招生规模也将扩大&#xff0c;计划招收 600 名大学生&#xff0c;进行为期 5 周的理…

No.2 条件

2019独角兽企业重金招聘Python工程师标准>>> clojure中不仅有if 还有when 还有什么when-do when-first when-let 一堆 首先介绍if (defn if? [x](if (pos? x)x(- x))) 这事一个取绝对值的方法,方法名改了下,pos? 是判断是否为正数 参数只能为数字 能看明白吧…

如何用Python和BERT做中文文本二元分类?| 程序员硬核评测

点击上方↑↑↑蓝字关注我们~「2019 Python开发者日」全日程揭晓&#xff0c;请扫码咨询 ↑↑↑作者 | 王树义来源 | 王树芝兰&#xff08;ID:nkwangshuyi&#xff09;兴奋去年&#xff0c; Google 的 BERT 模型一发布出来&#xff0c;我就很兴奋。因为我当时正在用 fast.ai 的…

【C++】Google Protocol Buffer(protobuf)详解(二)

代码走读&#xff1a;caffe中protobuf的详细使用过程 【一】proto文件&#xff0c;以caffe.proto中BlobShape为例 syntax "proto2"; //指明protobuf版本&#xff0c;默认是v2&#xff0c;其它版本&#xff1a;"proto3"package caffe; // 最终生成c代码…

Linux使用

软件操作 软件包管理 yum安装 yum install ...卸载 yum remove ...搜索 yum serach ...清理缓存 yum clean packages列出已安装 yum list软件包信息 yum info ...硬件资源信息 内存free -m 硬盘df -h 负载&#xff08;w或top&#xff09;w 12:53:49 up 2:33, 3 users, load ave…

通过进程ID获得该进程主窗口的句柄

一个进程可以拥有很多主窗口&#xff0c;也可以不拥有主窗口&#xff0c;所以这样的函数是不存在的&#xff0c;所幸的是&#xff0c;相反的函数是有的。所以我们可以调用EnumWindows来判断所有的窗口是否属于这个进程。 typedef struct tagWNDINFO{  DWORD dwProcessId;  …

【AI】caffe源码分析(一)

【一】caffe依赖开源库 【C】google gflags详解 【C】google glog详解 【C】Google Protocol Buffer&#xff08;protobuf&#xff09;详解&#xff08;一&#xff09; 【C】Google Protocol Buffer&#xff08;protobuf&#xff09;详解&#xff08;二&#xff09; 【C】goog…

专访博世王红星:大数据和AI将是中国制造业升级新动力

数据分析挖掘与工业大数据是智能制造与工业互联网的核心&#xff0c;其本质是通过促进数据的自动流动与智能决策去解决控制和业务问题&#xff0c;有效减少决策过程所带来的不确定性&#xff0c;并尽量克服人工决策的缺点&#xff0c;从而推动智能制造进程与智能工厂的建设&…

C进阶 - 内存四驱模型

一.内存四驱模型 不知我们是否有读过 《深入理解 java 虚拟机》这本书&#xff0c;强烈推荐读一下。在 java 中我们将运行时数据&#xff0c;分为五个区域分别是&#xff1a;程序计数器&#xff0c;java 虚拟机栈&#xff0c;本地方法栈&#xff0c;java 堆&#xff0c;方法区。…

ATEN—第十章OSPF的高级配置(4)

实验使用的工具&#xff1a;小凡模拟器一、在路由器R1上&#xff0c;配置接口&#xff0c;启动ospf路由进程和rip,宣告网段&#xff0c;并配置路由重分发★☆R1☆★☆→Router>Router>enableRouter#config terminalRouter(config)#hostname R1-jinR1-jin(config)#interfa…

【ubuntu】ubuntu14.04、16.04、18.04 LTS版本支持时间

0、历史版本下载地址 http://old-releases.ubuntu.com/releases/ http://mirrors.163.com/ubuntu-releases/ 1、官网说明 https://wiki.ubuntu.com/Kernel/LTSEnablementStack 2、简要记录 如下图&#xff1a; 14.04.0(v3.13) 14.04.1(v3.13) 14.04.5(v4.4) LTS 支持至 20…

BERT拿下最佳长论文奖!NAACL 2019最佳论文奖公布

点击上方↑↑↑蓝字关注我们~「2019 Python开发者日」全日程揭晓&#xff0c;请扫码咨询 ↑↑↑作者 | 刘静编辑 | 李尔客本文经授权转自公众号图灵Topia&#xff08;ID&#xff1a;turingtopia&#xff09;今日&#xff0c;自然语言处理顶会NAACL 2019最佳论文奖公布&#xff…

Git Bash修改默认路径

Git Bash默认安装在C:/user目录下&#xff0c;如果管理其他目录的代码库&#xff0c;需要切换目录。 修改Git Bash的默认路径&#xff0c;不需要每次切换了。 方法&#xff1a; 桌面Git Bash快捷方式&#xff0c;右键-->属性-->“快捷方式”标签 1&#xff0c;修改“起止…

NextGEN Gallery ~ 最强WordPress相册插件

博客照片很多&#xff1f;上传和管理图片太烦&#xff1f;想幻灯显示相册&#xff1f;在博客中任意插入动态图片效果&#xff1f;…… 你和我一样&#xff0c;需要NextGEN Gallery&#xff0c;最强WordPress相册插件&#xff01; 其实网上可以搜到不少关于这个插件的介绍&#…

【经验】网络加速:pip

一、python pip下载加速 参考博客&#xff1a;让PIP源使用国内镜像&#xff0c;提升下载速度和安装成功率。 pip/anaconda修改镜像源&#xff0c;加快python模块安装速度 1、Linux下 修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”&#xff0c;表示是隐…

iframe 有那些缺

*iframe 会阻塞主页面的 Onload 事 *iframe 和主页面共享连接池&#xff0c;而浏览器对相同域的连接有限制(6-8前)&#xff0c;所以会影响页面的并行加 使用 iframe 之前需要考虑这两个缺点。如果需要使用 iframe&#xff0c;最通过 javascrit 动态给 iframe 添加 src 属性值&a…

用Python让蔡徐坤在我的命令行里打篮球!|附完整代码

点击上方↑↑↑蓝字关注我们~「2019 Python开发者日」全日程揭晓&#xff0c;请扫码咨询 ↑↑↑来源 | 01二进制&#xff08;ID:gh_d1999add1857&#xff09;编辑 | Jane【导语】作者自称是一个经常逛 B 站的肥宅。最近 B 站上流行的视频素材除了“换脸”&#xff0c;其次就要属…

javascript 操作Word和Excel的实现代码

1.保存html页面到word 复制代码 代码如下:<HTML> <HEAD> <title> </title> </HEAD> <body> <form id"form"> <table id "PrintA" width"100%" border"1" cellspacing"0" cel…

【C++】C++11新增关键字详解

目录一、auto1、auto 用来声明自动变量&#xff0c;表明变量存储在栈&#xff08;C11之前&#xff09;2、auto用于推断变量类型示例&#xff08;C11&#xff09;3、声明或定义函数时作为函数返回值的占位符&#xff0c;此时需要与关键字 decltype 一起使用。&#xff08;C11&am…

linux批量创建用户和密码

老男孩教育第五关实战考试题&#xff1a;批量创建10个用户stu01-stu10&#xff0c;并且设置随机8位密码&#xff0c;要求不能用shell的循环&#xff08;例如&#xff1a;for,while等&#xff09;&#xff0c;只能用linux命令及管道实现。 方法1&#xff1a;[rootoldboy /]# ech…

“重构”黑洞:26岁MIT研究生的新算法 | 人物志

点击上方↑↑↑蓝字关注我们~「2019 Python开发者日」全日程揭晓&#xff0c;请扫码咨询 ↑↑↑整理 | 若名出品 | AI科技大本营&#xff08;ID:rgznai100&#xff09;这是一个重要时刻。除了发布跟丈夫的两张合照外&#xff0c;Katie Bouman 在 Facebook 上鲜有内容更新&#…

【Ubuntu】VirtualBox显卡驱动VBoxVGA、VBoxSVGA、VMSVGA +3D对播放视频的影响

一、VBOXVGA、VMSVGA、VBOXSVGA简述 VBOXVGA和VBOXSVGA是vbox自己的&#xff0c;SVGA比VGA先进一点&#xff0c; VBoxSVGA: 使用Linux或者 Windows 7或者更高版本的新vm的默认图形控制器。 与传统的VBoxVGA选项相比&#xff0c;此图形控制器可提高性能和3D支持。 VBoxVGA: 将这…