Dealing with potentially sparse trainable weights

I’m wondering what’s the Tensorflow way of storing and performing Tensor manipulation (i.e. Tensor multiplication, apply_gradient) of trainable weights in a custom layer that could potentially be sparse based on user specification. I’ve looked into


but I’m not sure if it’s possible to apply these as ways to store and update trainable weights.

Have you already take a look at: