1 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") |
clion cmakelist
发表于 | 阅读次数:
atrous卷积
发表于 | 阅读次数:
tensorflow 变量空间
发表于 | 阅读次数:
tf.Variable 和 tf.get_variable 区别
使用tf.Variable时,如果检测到命名冲突,系统会自己处理。使用tf.get_variable()时,系统不会处理冲突,而会报错
所以还是用tf.get_variable()好
name_scope 和 variable_scope
get_variable只看variable_scope, variable都看
1 | In [47]: with tf.name_scope('nsc1'): |
tensorflow conv2-same 理解
发表于 | 阅读次数:
数字理解
输出结果的shape计算:
‘SAME’ 类型的padding,其输出的height和width计算如下:
out_height = ceil(float(in_height) / float(strides[1])) ceil:向上取整
out_width = ceil(float(in_width) / float(strides[2]))
‘VALID’类型的padding, 其输出的height和width计算如下:
out_height = ceil(float(in_height – filter_height + 1) / float(strides[1]))
out_width = ceil(float(in_width – filter_width + 1) / float(strides[2]))
图片理解
具体计算理解
1 | x = |
1 | def testConv2DSameEven(self): |
总结
1 | 1. net = conv2d_same(inputs, num_outputs, 3, stride=stride) |
tf-faster-rcnn数据结构
发表于 | 阅读次数:
subsample
1 | def subsample(inputs, factor, scope=None): |
bottleneck
开始没理解resnet_utils.subsample和slim.conv2d的区别,后来发现其实
问题在于depth, 如何depth已经搞定了,那么就直接subsample就好了,如果
sample没搞定就得conv. 从这里可以看出一个问题desample的效果会好于conv2d.
1 | def bottleneck(inputs, depth, depth_bottleneck, stride, rate=1, |
tensorflow 常用命令
发表于 | 阅读次数:
config
1 | tfconfig = tf.ConfigProto(allow_soft_placement=True) |
声明placeholder
1 | self._image = tf.placeholder(tf.float32, shape=[1, None, None, 3]) |
数字转换
1 | tf.to_int32() |
数组操作
1 | tf.transpose() |
py_func
1 | py_func( |
时间
loss 常用函数
1 | cross_entropy = -tf.reduce_sum(true_y*tf.log(out_y)) |
conda环境迁移
发表于 | 阅读次数:
1 | conda env export > environment.yml |
docker使用
发表于 | 阅读次数:
1 | sudo apt-get update |
jupyter 隐藏环境名
发表于 | 阅读次数:
1 | conda config --set changeps1 False |