How to update unpruned weights of a TF model

Hi,

Is there an efficient way to update only the unpruned weights of a pruned TF model during model retraining?
One way to do this is to keep a mask and multiply the gradient by mask.
But this takes additional time due to extra calculations.
I’m looking for an efficient way to do this without additional calculations.

Highly appreciate any suggestion on this.