Setting attributes in all layers from a symbol

Is it possible to set an attribute in some layers from the symbol?

I tried the following and it doesn’t work:

    model_attr = model_symbol.attr_dict()
    model_attr['conv_1_weight']['lr_mult'] = 0.01

This doesn’t work because the attr dict returned is a copy from the symbol. Is it possible to somehow change the parameters of certain layers from one place instead of going to the layer definitions and adding the attribute there?

i.e., I want to avoid doing this in all the layers:
c1 = mx.sym.Convolution(data, kernel=(3,3), num_filter=16, name="conv_1", attr={"lr_mult": "0.01"})

Edit: I have also tried the following

    model_symbol = model_symbol_group[0] # since I have a symbol group
    model_attr = model_symbol.attr_dict()
    model_attr['conv_1_weight']['lr_mult'] = 0.01
    model_attr['conv_1_weight']['__lr_mult__'] = 0.01
    model_symbol._set_attr(**model_attr['conv_1_weight'])

I got the last call from https://mxnet.incubator.apache.org/_modules/mxnet/symbol/symbol.html
This also isn’t working. I get no errors on _set_attr but when I try to view the attr dict again, it doesn’t have the changes.

Here is a working code:

a = mx.sym.var('a', attr = {'attr': 'a'})
print(a.list_attr())
# prints {'attr': 'a'}
a._set_attr(attr = 'b')
print(a.list_attr())
# prints {'attr': 'b'}

I don’t really do symbolic code, so I’m quite not sure that this is a good or valid way to do. I also don’t think that there’s an official way to do what you want, may be some expert in symbol code would help you.

This only works for symbols which have no children and will not work for the whole model symbol. I was able to solve this for model symbol by doing DFS over the model symbol to get to the leaf nodes and then setting it for them.