We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b7902e commit 421eaceCopy full SHA for 421eace
src/caffe/layers/one_hot_layer.cpp
@@ -85,7 +85,7 @@ void OneHotLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype> *> &bottom,
85
vector<int> b_ind = indices(i, bottom_shape);
86
int b_idx = offset(top, axis_ind, b_ind);
87
if (bottom_data[i] >= 0 && bottom_data[i] < depth) {
88
- int t_idx = b_idx + bottom_data[i] * top[0]->count(axis + 1);
+ int t_idx = b_idx + int(bottom_data[i]) * top[0]->count(axis + 1);
89
top_data[t_idx] = on_value;
90
}
91
0 commit comments