From bba50a4ae5db7c998ab17ff06e0a86960f34c263 Mon Sep 17 00:00:00 2001 From: azrael0fog Date: Wed, 20 Feb 2019 17:20:46 +0800 Subject: [PATCH] Update cosin_add_m_layer.cu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里是不是应该 *= 啊。 --- cosin_add_m_layer.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } }