For each dense layer, after setting some of its weights to 0.0, I want them to be ignored during both inference and training. They would not affect the model's loss, and I would later be able to re-train using only the remaining (non-ignored) weights.
I am aware of Keras' Masking layer, but I can't get it to only mask individual weights (those equal to a value, say 0.0) in a layer. Apparently, it requires that all columns in a row be equal to that value (0.0 as per my preference) to mask that row, whereas I want to mask weights of 0.0 without affecting non-0.0 weights.