TreeLSTMSentiment icon indicating copy to clipboard operation
TreeLSTMSentiment copied to clipboard

What is getParameters() used for?

Open ZhaofengWu opened this issue 6 years ago • 2 comments

Looks like nowhere is that called.

ZhaofengWu avatar Feb 01 '19 00:02 ZhaofengWu

getParameters() is use to get weight matrix.

It is intend to override the function parameters() of any pytorch built-in model (see PyTorch: Extract learned weights correctly )

In this code, getParameters() is useful if you want to visualize, or debug

ttpro1995 avatar Feb 07 '19 09:02 ttpro1995

getParameters() call parameters() of each sub-module [self.ix, self.ih, self.fx, self.fh, self.ox, self.oh, self.ux, self.uh]

ttpro1995 avatar Feb 07 '19 10:02 ttpro1995