以Tensorflow为例。

=======================================

神经网络(TensorFlow举例)在GPU中训练时需要占用的内存大概有下面几部分组成:

1. TensorFlow的自身的计算库导入显存时所在内存,一般在session初始化时就会自动导入,这部分大小与TensorFlow的版本有关,这里大概估计普遍为450MB大小;

2. 神经网络的本身模型大小;

3. 优化器对神经网络模型进行优化时自身参数大小,一般一阶优化器的自身参数大小和神经网络模型本身大小相同,二阶优化器一般为模型本身大小的两倍(如:RMSProp优化器);

4. 神经网络前向计算时所产生的临时Tensor,这部分Tensor需要被临时保存,以便在反传计算梯度时使用,这部分Tensor的大小和模型的每一层结构形状有关(必须根据具体模型的每层形状来计算)也和具体的batch_size大小以及输入数据input_data的大小有关;

5. 神经网络向后性计算时被人为设定的一些负责监督运行状态或其他操作的Tensor,如:某些层的反传计算出的梯度进行正则化后或进行求mean/std/max/min等操作产生的Tensor,某些层前传时计算该层输出的一些统计Tensor(求mean/std/max/min等操作产生的Tensor);

--------------------------------------------

在估计一个模型在训练时所需的显存空间一般可以考虑将上面1, 2, 3部分的大小加总即可;4部分的大小难以计算,毕竟这个大小还和输入数据的大小和batch_size有关,而且每层的输出结构也是差异极大的;5部分的大小一般有限,可以不主要考虑。

PS:

这里需要说明一下,有些时候我们在跑模型训练的时候发现显存不够报错的时候我们可以通过调小batch_size的方式来解决,这时候我们就是通过调小第4部分显存大小来解决的;但是有些时候即使把batch_size设置为1也无法满足,那么就应该是第1,2,3部分所占显存空间已经超出了可用空间大小。

--------------------------------------------

 

关于第一部分显存大小,下面给出TensorFlow1.14版本的情况:

查看显存占用:

可以看到导入库后所占显存大小为104MB。

--------------------------------------------

 

关于第2, 3部分的大小,我们使用例子:(只给出项目中进行修改的文件)

https://gitee.com/devilmaycry812839668/paac/blob/master/actor_learner.py

我们在__init__函数中添加下面代码:

        for var in self.optimizer_variables:
print(var)
print("="*30) for var in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES):
print(var)
print("="*30) all_var = tf.concat([tf.reshape(var, [-1]) for var in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES)], axis=0)
print(all_var.shape)
print("="*30) print(self.optimizer.get_slot_names())
for name in self.optimizer.get_slot_names():
for var in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES):
print(self.optimizer.get_slot(var, name))

运行结果:

<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables_1:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables_1:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables_1:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables_1:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables_1:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables_1:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables_1:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables_1:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables_1:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables:0' shape=(1,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables_1:0' shape=(1,) dtype=float32_ref>
==============================
<tf.Variable 'local_learning_1/conv1_weights:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases:0' shape=(1,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables_1:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables_1:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables_1:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables_1:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables_1:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables_1:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables_1:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables_1:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables_1:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables:0' shape=(1,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables_1:0' shape=(1,) dtype=float32_ref>
==============================
(2033829,)
==============================
['momentum', 'rms']
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables_1:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables_1:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables_1:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables_1:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables_1:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables_1:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables_1:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables_1:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables_1:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables_1:0' shape=(1,) dtype=float32_ref>
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables:0' shape=(1,) dtype=float32_ref>
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None

通过结果我们可以知道,第2部分显存为模型的参数,即10个Tensor Variable所占,第3部分为20个针对模型参数的优化器参数,即20个Tensor Variable所占;其中模型参数(10个Variable)大小总共为(MB):

优化器的参数时模型参数的两倍,所以总共的Variable参数为3倍的模型参数(MB):

模型参数,10个Variable:

<tf.Variable 'local_learning_1/conv1_weights:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases:0' shape=(1,) dtype=float32_ref>

优化器参数(二阶),20个Variable:

<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables_1:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables_1:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables_1:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables_1:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables_1:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables_1:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables_1:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables_1:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables_1:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables:0' shape=(1,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables_1:0' shape=(1,) dtype=float32_ref>

其中,这20个优化器参数在槽['momentum']中的有:

<tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables_1:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables_1:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables_1:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables_1:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables_1:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables_1:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables_1:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables_1:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables_1:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables_1:0' shape=(1,) dtype=float32_ref>

其中,这20个优化器参数在槽['rms']中的有:

 <tf.Variable 'local_learning_1/conv1_weights/OptimizerVariables:0' shape=(8, 8, 4, 16) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv1_biases/OptimizerVariables:0' shape=(16,) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_weights/OptimizerVariables:0' shape=(4, 4, 16, 32) dtype=float32_ref>
<tf.Variable 'local_learning_1/conv2_biases/OptimizerVariables:0' shape=(32,) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_weights/OptimizerVariables:0' shape=(2592, 256) dtype=float32_ref>
<tf.Variable 'local_learning_1/fc3_biases/OptimizerVariables:0' shape=(256,) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_weights/OptimizerVariables:0' shape=(256, 6) dtype=float32_ref>
<tf.Variable 'local_learning_2/actor_output_biases/OptimizerVariables:0' shape=(6,) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_weights/OptimizerVariables:0' shape=(256, 1) dtype=float32_ref>
<tf.Variable 'local_learning_2/critic_output_biases/OptimizerVariables:0' shape=(1,) dtype=float32_ref>

判断优化器中参数是否可以训练:

查询结果:

------------------------------------------------------

可以看到,在例子中,第2部分和第3部分的显存大小共为:7.7584MB

而第1部分的显存占用为104MB,那么我们运行下例子所在的项目,看下总共在训练时占用显存大小:

由此我们可以知道,即使是一些模型大小特别小的模型(模型参数加优化器参数共7.7584MB)也可以在运行时占用大量显存,这时候所占用显存的主要为第4部分和第5部分所占,我们将batch_size设置为1,然后再看下:

此时项目启动命令:python3 train.py -g pong -df logs/ -ec 1 -ew 1 --max_local_steps 1

PS:

通过这个例子,我们可以知道,即使一个模型特别小(优化器参数也随之很小,共7.7584MB),但是计算过程中所需导入显存的lib库和训练过程中产生的临时Tensor、用于检测的Tensor所占的空间大小也可以是很大的,甚至是近百倍于模型参数大小;所以说一个模型在训练过程中所需最小显存空间并不由模型参数大小所完全决定,有时候训练过程中的临时Tensor大小会大于模型参数大小;通过修改batch_size可以缩小训练过程中的临时Tensor大小,但是这个缩小程度毕竟有限,例子中通过减小batch size所获增加的空余显存空间为832-592=240MB。

------------------------------------------------------

 

RMSProp优化器:

参考:

https://www.coder.work/article/93009

=======================================

在进行神经网络训练时需要使用的显存空间大小的预估——300MB的神经网络在训练时最少需要占用多大的显存空间的更多相关文章

  1. 交叉熵代价函数——当我们用sigmoid函数作为神经元的激活函数时,最好使用交叉熵代价函数来替代方差代价函数,以避免训练过程太慢

    交叉熵代价函数 machine learning算法中用得很多的交叉熵代价函数. 1.从方差代价函数说起 代价函数经常用方差代价函数(即采用均方误差MSE),比如对于一个神经元(单输入单输出,sigm ...

  2. 用SQL语句实现:当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列。

    数据库中有A B C三列,用SQL语句实现:当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列. 方法一: select (case when a>b then a el ...

  3. 设置一个div网页滚动时,使其固定在头部,当页面滚动到距离头部300px时,隐藏该div,另一个div在底部,此时显示;当页面滚动到起始位置时,头部div出现,底部div隐藏

    设置一个div网页滚动时,使其固定在头部,当页面滚动到距离头部300px时,隐藏该div,另一个div在底部,此时显示: 当页面滚动到起始位置时,头部div出现,底部div隐藏 前端代码: <! ...

  4. 在mvc返回JSON时出错:序列化类型为“System.Data.Entity.DynamicProxies.Photos....这个会的对象时检测到循环引用 的解决办法

    在MVC中返回JSON时出错,序列化类型为“System.Data.Entity.DynamicProxies.Photos....这个会的对象时检测到循环引用. public ActionResul ...

  5. 题目:企业发放的奖金根据利润提成。 利润(I)低于或等于10万元时,奖金可提10%; 利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%; 20万到40万之间时,高于20万元的部分,可提成5%; 40万到60万之间时高于40万元的部分,可提成 3%; 60万到100万之间时,高于60万元的部分,可提成1.5%; 高于100万元时,超过

    题目:企业发放的奖金根据利润提成. 利润(I)低于或等于10万元时,奖金可提10%: 利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%: 20万到 ...

  6. SQL语句实现:当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列

    分享一道今天的面试题:SQL语句实现:数据库中有A B C三列,当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列 第一种:使用case when...then...else ...

  7. 代码实现:企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%; 利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%; 20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%; 60万到100万之间时,高于60万元的部分,可提成1.5%,高于100万元时,超过100万元

    import java.util.Scanner; /* 企业发放的奖金根据利润提成.利润(I)低于或等于10万元时,奖金可提10%: 利润高于10万元,低于20万元时,低于10万元的部分按10%提成 ...

  8. iOS开发之UIImage在压缩时失真问题,压缩图片的大小

    今天遇到UIImage在压缩时失真问题,压缩图片的大小图片模糊 错误的方案 /** * 压缩图片 * image:将要压缩的图片 size:压缩后的尺寸 */ -(UIImage*) OriginIm ...

  9. 深度学习原理与框架-猫狗图像识别-卷积神经网络(代码) 1.cv2.resize(图片压缩) 2..get_shape()[1:4].num_elements(获得最后三维度之和) 3.saver.save(训练参数的保存) 4.tf.train.import_meta_graph(加载模型结构) 5.saver.restore(训练参数载入)

    1.cv2.resize(image, (image_size, image_size), 0, 0, cv2.INTER_LINEAR) 参数说明:image表示输入图片,image_size表示变 ...

  10. 【神经网络与深度学习】Caffe使用step by step:使用自己数据对已经训练好的模型进行finetuning

    在经过前面Caffe框架的搭建以及caffe基本框架的了解之后,接下来就要回到正题:使用caffe来进行模型的训练. 但如果对caffe并不是特别熟悉的话,从头开始训练一个模型会花费很多时间和精力,需 ...

随机推荐

  1. vm ware 虚拟WIN10 时,chrome ,cent browser 显示异常,花屏

    类似: 解决方法: 在VM WARE 显卡设置中关闭"加速3D图形". -

  2. 在线IP归属地查询工具

    在线IP地址归属地查询工具,通过该工具可以查询指定IP的物理地址或域名服务器的IP和物理地址,及所在国家或城市IP归属地,数据为纯真IP. 在线IP归属地查询工具

  3. MySQL条件判断IF,CASE,IFNULL语句详解

    MySQL条件判断IF,CASE,IFNULL语句详解 1.IF语句的基本用法IF(condition, true_statement, false_statement);condition: 条件表 ...

  4. 字符数组转换及数字求和 java8 lambda表达式 demo

    public static void main(String[] args) throws IllegalAccessException { //字符串转换为数字且每个加上100,输出. String ...

  5. 给你的博客加上个Live2D看板娘吧

    Tips:当你看到这个提示的时候,说明当前的文章是由原emlog博客系统搬迁至此的,文章发布时间已过于久远,编排和内容不一定完整,还请谅解` 给你的博客加上个Live2D看板娘吧 日期:2017-12 ...

  6. C#.Net筑基-集合知识全解

    01.集合基础知识 .Net 中提供了一系列的管理对象集合的类型,数组.可变列表.字典等.从类型安全上集合分为两类,泛型集合 和 非泛型集合,传统的非泛型集合存储为Object,需要类型转.而泛型集合 ...

  7. 解决Linux下无法编译带有中文的JAVA程序问题

    只要在编译的时候加上-encoding gbk即可 例如: javac -encoding gbk Myclass.java

  8. Python中multiprocessing.Pool进程池实现守护进程的方法

    前言 在multiprocessing.Process中可以使用p.daemon=True将子进程p设置为守护进程. 那么在multiprocessing.Pool进程池中怎么实现这个功能呢? 什么是 ...

  9. NVIDIA Jetson AGX Xavier 从刷机之后到配置环境

    特殊的配置环境需求: cuda-10.2.python 3.6.9.torch 1.7.0.torchversion 0.8.1,剩下的顺其自然即可(逃. 顺便说一句,里面的指令请一行一行仔细复制粘贴 ...

  10. ElasticSearch不区分字母大小写搜索

    0.停止使用该索引的服务(避免新加了数据没备份) 1.备份filesearch索引(检查备份的索引和原索引数据条数是否一致) 1 POST http://127.0.0.1:9200/_reindex ...