We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
拜读了您的文章,非常有收获,但仔细阅读了代码后发觉几处不理解的地方,在此向您讨教。 以下SGD update部分的函数 //relation relation_tmp[rel_a][i] += rate_c_posErrorVec[tid][i]; //head nonLinear_2 = 1-cnn_vec[e1_a][i]_cnn_vec[e1_a][i]; cnn_grad[e1_a][i] += rate_c_posErrorVec[tid][i]_nonLinear_2; //tail nonLinear_2 = 1-cnn_vec[e2_a][i]_cnn_vec[e2_a][i]; cnn_grad[e2_a][i] -= rate_c_posErrorVec[tid][i]_nonLinear_2; //relation relation_tmp[rel_b][i] -= rate_c_negErrorVec[tid][i];
问题1:nonLinear_2是对CNN神经元的激活函数求导的变量么? 问题2:这一部分代码是否是计算cost = |t1 - r1 - h1| - |t2 - r2 -h2|的偏导数?代码部分 entity_vec[e2][ii]-cnn_vec[e1][ii]-relation_vec[rel][ii]是|tail - relation - head|,而文章中是|head + relation -tail|?
The text was updated successfully, but these errors were encountered:
您好: 问题1:是对tanh的求导; 问题2:是在不符合margin下计算cost的偏导,由于有正负例所以梯度更新方向会相反。
Sorry, something went wrong.
No branches or pull requests
拜读了您的文章,非常有收获,但仔细阅读了代码后发觉几处不理解的地方,在此向您讨教。
以下SGD update部分的函数
//relation
relation_tmp[rel_a][i] += rate_c_posErrorVec[tid][i];
//head
nonLinear_2 = 1-cnn_vec[e1_a][i]_cnn_vec[e1_a][i];
cnn_grad[e1_a][i] += rate_c_posErrorVec[tid][i]_nonLinear_2;
//tail
nonLinear_2 = 1-cnn_vec[e2_a][i]_cnn_vec[e2_a][i];
cnn_grad[e2_a][i] -= rate_c_posErrorVec[tid][i]_nonLinear_2;
//relation
relation_tmp[rel_b][i] -= rate_c_negErrorVec[tid][i];
问题1:nonLinear_2是对CNN神经元的激活函数求导的变量么?
问题2:这一部分代码是否是计算cost = |t1 - r1 - h1| - |t2 - r2 -h2|的偏导数?代码部分 entity_vec[e2][ii]-cnn_vec[e1][ii]-relation_vec[rel][ii]是|tail - relation - head|,而文章中是|head + relation -tail|?
The text was updated successfully, but these errors were encountered: