Thanks for the code. Unfortunately, I cannot debug it, as stack_coo_matrix is undefined and the npy file cannot de decoded.
Anyway, I assume the sparse2tensor method just creates a dense tensor using some kind of sparse format.
Could you post the shapes of this dense tensor and pass it for debugging purposes to the method.
I double that sparse2tensor can somehow make the updates of self.eta fail, as it should be just a transformation on your input as far as I see.