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

Method ForwardFromTo

src/caffe/net.cpp:516–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515template <typename Dtype>
516Dtype Net<Dtype>::ForwardFromTo(int start, int end) {
517 CHECK_GE(start, 0);
518 CHECK_LT(end, layers_.size());
519 Dtype loss = 0;
520 for (int i = start; i <= end; ++i) {
521 for (int c = 0; c < before_forward_.size(); ++c) {
522 before_forward_[c]->run(i);
523 }
524 Dtype layer_loss = layers_[i]->Forward(bottom_vecs_[i], top_vecs_[i]);
525 loss += layer_loss;
526 if (debug_info_) { ForwardDebugInfo(i); }
527 for (int c = 0; c < after_forward_.size(); ++c) {
528 after_forward_[c]->run(i);
529 }
530 }
531 return loss;
532}
533
534template <typename Dtype>
535Dtype Net<Dtype>::ForwardFrom(int start) {

Callers 1

TYPED_TESTFunction · 0.80

Calls 3

ForwardMethod · 0.80
sizeMethod · 0.45
runMethod · 0.45

Tested by 1

TYPED_TESTFunction · 0.64