Deep learning framework by BAIR
Created by
Yangqing Jia
Lead Developer
Evan Shelhamer
Flatten
./include/caffe/layers/flatten_layer.hpp
./src/caffe/layers/flatten_layer.cpp
The Flatten
layer is a utility layer that flattens an input of shape n * c * h * w
to a simple vector output of shape n * (c*h*w)
.
FlattenParameter flatten_param
)./src/caffe/proto/caffe.proto
:/// Message that stores parameters used by FlattenLayer
message FlattenParameter {
// The first axis to flatten: all preceding axes are retained in the output.
// May be negative to index from the end (e.g., -1 for the last axis).
optional int32 axis = 1 [default = 1];
// The last axis to flatten: all following axes are retained in the output.
// May be negative to index from the end (e.g., the default -1 for the last
// axis).
optional int32 end_axis = 2 [default = -1];
}