I am using Caffe for deep learning. My program is in C++.
Every iteration of forward at net_->Forward(&loss);
, we pass through all layers as defined in the prototxt file and how can I visualize each layer's output in C++.
Inside net.cpp
file inside Caffe library
, this loop iterate to forward layer by layer.
template <typename Dtype>
Dtype Net<Dtype>::ForwardFromTo(int start, int end) {
CHECK_GE(start, 0);
CHECK_LT(end, layers_.size());
Dtype loss = 0;
for (int i = start; i <= end; ++i) {
//cout << "Forwarding " << layer_names_[i] << endl;
Dtype layer_loss = layers_[i]->Forward(bottom_vecs_[i], top_vecs_[i]);
loss += layer_loss;
if (debug_info_) { ForwardDebugInfo(i); }
}
return loss;
}
top_vecs_[i] is output of each layer
and how can I visualize it?