Reshape层
reshape层的作用是在不改变数据的情况下,改变输入的维度
layer {
name: "reshape"
type: "Reshape"
bottom: "input"
top: "output"
reshape_param {
shape {
dim: 0 # copy the dimension from below
dim: 2
dim: 3
dim: -1 # infer it from the other dimensions
}
}
}
- 可选参数组shape用于指定blob数据的各维的值(blob是一个四维的数据:

本文介绍了Reshape层和Dropout层的基本作用。Reshape层允许在保持数据总量不变的情况下改变输入的维度,通过指定shape参数来调整blob数据的维度,如保留维度(dim: 0)、转换为二维(dim: 2)或三维(dim: 3),或让系统自动计算(-1)。而Dropout层作为一种防止过拟合的手段,主要配置参数为dropout_ratio,用于控制随机失活的比例。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



