Hi everyone! I read some studies about Pruning useless weights of translation models which can save model size about 90% [https://arxiv.org/pdf/1606.09274.pdf]. I would like to get model weights and make a study like in https://blog.gongzhitaao.org/useless-parameters/ but I don’t know how to get weights. I know to load the model but I don’t see property “weights” or something similar.
I use the following code to search weights.
function dir(obj) for k, v in pairs(obj) do print(k) end end require('onmt.init') require('cutorch') model= torch.load("/home/German/datasets/Lingvanex/EN-ES/sciling-corpus/exp17_12_19/models/_epoch10_3.82.t7") dir(model) -- dir(model.models)
I’m not an expert in lua so please tell me how can I access weights of each layer.