MCPcopy Create free account
hub / github.com/BVLC/caffe / BackwardDebugInfo

Method BackwardDebugInfo

src/caffe/net.cpp:612–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610
611template <typename Dtype>
612void Net<Dtype>::BackwardDebugInfo(const int layer_id) {
613 const vector<Blob<Dtype>*>& bottom_vec = bottom_vecs_[layer_id];
614 for (int bottom_id = 0; bottom_id < bottom_vec.size(); ++bottom_id) {
615 if (!bottom_need_backward_[layer_id][bottom_id]) { continue; }
616 const Blob<Dtype>& blob = *bottom_vec[bottom_id];
617 const string& blob_name = blob_names_[bottom_id_vecs_[layer_id][bottom_id]];
618 const Dtype diff_abs_val_mean = blob.asum_diff() / blob.count();
619 LOG_IF(INFO, Caffe::root_solver())
620 << " [Backward] "
621 << "Layer " << layer_names_[layer_id]
622 << ", bottom blob " << blob_name
623 << " diff: " << diff_abs_val_mean;
624 }
625 for (int param_id = 0; param_id < layers_[layer_id]->blobs().size();
626 ++param_id) {
627 if (!layers_[layer_id]->param_propagate_down(param_id)) { continue; }
628 const Blob<Dtype>& blob = *layers_[layer_id]->blobs()[param_id];
629 const Dtype diff_abs_val_mean = blob.asum_diff() / blob.count();
630 LOG_IF(INFO, Caffe::root_solver())
631 << " [Backward] "
632 << "Layer " << layer_names_[layer_id]
633 << ", param blob " << param_id
634 << " diff: " << diff_abs_val_mean;
635 }
636}
637
638template <typename Dtype>
639void Net<Dtype>::UpdateDebugInfo(const int param_id) {

Callers

nothing calls this directly

Calls 4

asum_diffMethod · 0.80
countMethod · 0.80
param_propagate_downMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected