зеркало из https://github.com/microsoft/caffe.git
Fix test issues
This commit is contained in:
Родитель
d5f5bd5d7f
Коммит
66d73988d0
|
@ -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());
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче