This commit is contained in:
Oh233 2016-08-01 19:17:38 +08:00
Родитель d5f5bd5d7f
Коммит 66d73988d0
3 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -60,7 +60,7 @@ class SoftmaxWithLossOHEMLayer : public LossLayer<Dtype> {
virtual void Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);
virtual inline const char* type() const { return "SoftmaxWithLoss"; }
virtual inline const char* type() const { return "SoftmaxWithLossOHEM"; }
virtual inline int ExactNumTopBlobs() const { return -1; }
virtual inline int MinTopBlobs() const { return 1; }
virtual inline int MaxTopBlobs() const { return 3; }

Просмотреть файл

@ -48,9 +48,7 @@ void BatchNormLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
mean_.Reshape(sz);
variance_.Reshape(sz);
temp_.ReshapeLike(*bottom[0]);
if (use_global_stats_) {
x_norm_.ReshapeLike(*bottom[0]);
}
x_norm_.ReshapeLike(*bottom[0]);
sz[0]=bottom[0]->shape(0);
batch_sum_multiplier_.Reshape(sz);

Просмотреть файл

@ -75,7 +75,7 @@ namespace caffe {
// Output per-instance loss
if (top.size() >= 2) {
kernel_channel_sum<Dtype> << <CAFFE_GET_BLOCKS(top[0]->count()),
kernel_channel_sum<Dtype> << <CAFFE_GET_BLOCKS(top[1]->count()),
CAFFE_CUDA_NUM_THREADS >> > (outer_num_, bottom[0]->channels(),
inner_num_, errors_.gpu_data(), top[1]->mutable_gpu_data());
}