高级操作
u010946556
现在才开始写博客,有点晚了。
展开
-
The BatchNorm layer convertion to caffe model from tensorflow
caffe must set the batchnorm scale as 1, which is as follows. net.params[‘bn1’][2].data[…] = 1 Mean value is [0,0,0,0…,0] and variance is [1,1,1,1,…,1] The gamma and beta value are from tensorflow mo...原创 2020-01-07 16:41:01 · 170 阅读 · 0 评论 -
Count to tensorflow model FLOPs and trainable params
Count to tensorflow model FLOPs and trainable params Step1: Convert your tensorflow checkpoint model to PB format Step2: Call the function as follows import tensorflow as tf from tensorflow.python.fra...原创 2020-01-03 14:39:07 · 593 阅读 · 0 评论 -
How to process Conv weight during the model trainning
这里写自定义目录标题Tensorflow如何在训练的时候对卷积的权重进行一些特殊处理步骤如下整体代码 Tensorflow如何在训练的时候对卷积的权重进行一些特殊处理 比如对卷积的权重进行求均值,取最大值等等自定义的操作。 步骤如下 获取想要操作的的卷积核权重,保存到一个list中 申请一个同该卷核相同shape的占位符; 使用tf.assign()创建一个更新卷积核权重的操作op; 整体代码...原创 2019-07-22 16:40:27 · 183 阅读 · 0 评论