Hi Sarada, I am experimenting LAMBDA in excel to write an average_grad
function from fastai’s average_grad
. I have used both LAMBDA
and LET
in excel and the formula as you can imagine is very long. How can I write the long formula in excel nicely (without in a long line, which is unreadable) and even debug it along the way? Could you share some tips? Thanks!
=LAMBDA(p.grad.data, mom, dampening, grad_avg, LET(ini_grad, if(grad_avg="None", RANDARRAY(ROWS(p.grad.data), COLUMNS(p.grad.data),,,,False)*0, grad_avg), damp, if(dampening=FALSE, 1.0, 1-mom), p.grad.data*mom+grad_avg*damp))
I have reproduced average_grad
and two of its tests (from fastai) in Excel without using LAMBDA and LET in this workbook. The notes in the cells of the spreadsheet give some hints how to use the spreadsheet. You can get a reminder of the average_grad
and its tests by experiment them (fastai code) in the binder.