Skip to content

Can't get the real weights of the layers #156

Answered by jonarchist
WD799 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, this is because we use kernel DFT reparameterization by default, to improve training stability. So .get_weights() will return the DFTs of the kernels, and .kernel will return the kernel itself.

You can get the kernel using layer.kernel, and set it again using layer.kernel_parameter = RDFTParameter(kernel, name='kernel').

Or you can turn off RDFT reparameterization by instantiating the layer with the keyword kernel_parameter='variable'.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by WD799
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants