thunlp / NRE

Neural Relation Extraction, including CNN, PCNN, CNN+ATT, PCNN+ATT
MIT License
810 stars 309 forks source link

Calculate gradients and update parameters for CNN+ATT #25

Open pvthuy opened 6 years ago

pvthuy commented 6 years ago

For the code at: https://github.com/thunlp/NRE/blob/master/CNN%2BATT/train.cpp

I can not follow how to calculate gradients and update parameters, maybe from line 193 to line 238.

Could anyone explain, please? @Mrlyk423

Mrlyk423 commented 6 years ago

we calculate the loss function from line 114 to 174, and then calculate gradients from 176 to 238.