[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/2php/CaffeOnACL/master/src/caffe/layers/loss_layer.cpp [Back]  [Original]

#include 

#include "caffe/layers/loss_layer.hpp"

namespace caffe {

template 
void LossLayer::LayerSetUp(
    const vector& bottom, const vector& top) {
  // LossLayers have a non-zero (1) loss by default.
  if (this->layer_param_.loss_weight_size() == 0) {
    this->layer_param_.add_loss_weight(Dtype(1));
  }
}

template 
void LossLayer::Reshape(
    const vector& bottom, const vector& top) {
  CHECK_EQ(bottom[0]->shape(0), bottom[1]->shape(0))
      Reshape(loss_shape);
}

INSTANTIATE_CLASS(LossLayer);

}  // namespace caffe

Web Proxy Viewer  |  New URL  |  Original Page