[英]How Caffe implicitly do reshape on a blob before doing fully connecting calculation?
在进行完全连接计算之前,Caffe如何隐式地对Blob进行整形?
"InnerProduct"
layer (aka "fully connected") has a axis:
parameter that defines how caffe "flattens" the blob for the inner product. "InnerProduct"
层(也称为“完全连接”)具有axis:
参数,用于定义caffe如何“展平”内部产品的斑点。
You can see in inner_product_layer.cpp
: 您可以在
inner_product_layer.cpp
看到:
// Dimensions starting from "axis" are "flattened" into a single // length K_ vector. For example, if bottom[0]'s shape is (N, C, H, W), // and axis == 1, N inner products with dimension CHW are performed.
Since caffe stores Blobs contiguously in memory, no explicit reshape is needed for "flattening" the trailing dimensions of a blob. 由于caffe将Blob连续存储在内存中,因此无需显式重塑即可“展平” Blob的尾随尺寸。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.