Hi there,
In the implementation of classification example in Classification/main_cls_cv.py, the first and second order gradient calculations are calculated with the logic below
h = 1/((1+torch.exp(y*out))*(1+torch.exp(-y*out))), grad_direction = y * (1.0 + torch.exp(-y * out))
However, in the paper, the formula to calculate those gradients are $h_i = \frac{ 4 y^2_i e^{2y_i \hat{y}^{(t-1)}_i}}{\left (1+e^{2y_i \hat{y}^{(t-1)}_i} \right )^2}$, and $\tilde{y}_i = \frac{ y_i (1 + e^{-2y_i \hat{y}^{(t-1)}_i}) } {2} $.
Is there anything I may miss? Thanks.
Hi there,
In the implementation of classification example in
Classification/main_cls_cv.py, the first and second order gradient calculations are calculated with the logic belowh = 1/((1+torch.exp(y*out))*(1+torch.exp(-y*out))), grad_direction = y * (1.0 + torch.exp(-y * out))However, in the paper, the formula to calculate those gradients are$h_i = \frac{ 4 y^2_i e^{2y_i \hat{y}^{(t-1)}_i}}{\left (1+e^{2y_i \hat{y}^{(t-1)}_i} \right )^2}$ , and $\tilde{y}_i = \frac{ y_i (1 + e^{-2y_i \hat{y}^{(t-1)}_i}) } {2} $ .
Is there anything I may miss? Thanks.