Screenshot_2020-01-07 Google Colaboratory(3)715×420 23.8 KB

I think I might have solved this, if i keep everything as is and only comment out contex = Variable(context).cuda(), the grad for embedding is present.
I think declaring the output of encoder class as Variable somehow breaks the class, am i correct?