I had a matrix factorization network defined by the following graph. I could get the weights of the embedding layers. Say now I had saved the weights. If I reloaded the weights to a new instance of the same network graph, can I fix certain weights (eg, get only some weights being updated)?
For example, when training the new network instance, I actually just want to update the last weight of the 8 latent_dim weights, and leave the first 7 fixed.
latent_dim = 8 y_true = mx.symbol.Variable("label") user = mx.symbol.Variable("member") user = mx.symbol.Embedding(name='member_embedding', data=user, input_dim=n_users, output_dim=latent_dim) book = mx.symbol.Variable("book") book = mx.symbol.Embedding(name='book_embedding', data=book, input_dim=n_items, output_dim=latent_dim) dot = user * book dot = mx.symbol.sum_axis(dot, axis=1) dot = mx.symbol.Flatten(dot) dot = 1 - dot return mx.symbol.LinearRegressionOutput(data=dot, label=y_true)