template <typename Dtype>
void FlattenLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
+ CHECK_NE(top[0], bottom[0]) << this->type() << " Layer does not "
+ "allow in-place computation.";
const int start_axis = bottom[0]->CanonicalAxisIndex(
this->layer_param_.flatten_param().axis());
const int end_axis = bottom[0]->CanonicalAxisIndex(
template <typename Dtype>
void ReshapeLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
+ CHECK_NE(top[0], bottom[0]) << this->type() << " Layer does not "
+ "allow in-place computation.";
inferred_axis_ = -1;
copy_axes_.clear();
const BlobShape& top_blob_shape = this->layer_param_.reshape_param().shape();