diff --git a/cosin_add_m_layer.cu b/cosin_add_m_layer.cu index 22f12af..224d971 100644 --- a/cosin_add_m_layer.cu +++ b/cosin_add_m_layer.cu @@ -34,7 +34,7 @@ namespace caffe { if(flag[index * dim + gt] == 0.0f) { Dtype cos_theta = cos_data[index * dim + gt]; Dtype sin_theta = sqrt(1 - pow(cos_theta,2)); - bottom_diff[index * dim + gt] = cos(bais) + sin(bais) * cos_theta / sin_theta; + bottom_diff[index * dim + gt] *= cos(bais) + sin(bais) * cos_theta / sin_theta; } } }