-
Summary of the issueI'm running into issues implementing a vector quantization module. The model gets through one training iteration and errors out with:
The full stack trace of the error is further down, this is just to summarize the issue. I can successfully train the exact same model without the quantizer, so the issue is local to how I'm handling quantization. System and program specs2020 MacBook Air The codeThe code and instructions for replicating the issue are here. Apologies, cloning the repo may take longer than usual because of a few audio files serving as the dummy training dataset. A few notes about it:
Full stack trace and model implementation detailsStack trace:
Model details:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The problem seems to be related to "parameters" getting added to the model after the first iteration. E.g the In general it looks like you use a lot of state inside the modules which should not be treated as parameters. You can prefix those with Slightly more detailed explanation:
In theory we could be more dynamic with how we initialize the optimizer. However, in your case, I genuinely think those values should not be treated as parameters. Hence prefixing them with |
Beta Was this translation helpful? Give feedback.
The problem seems to be related to "parameters" getting added to the model after the first iteration. E.g the
qt_vals
inConvVQ
.In general it looks like you use a lot of state inside the modules which should not be treated as parameters. You can prefix those with
_
so that they are not picked up in the Module's parameters. For example use_qt_vals
instead ofqt_vals
. And when you keep track of all the loss values in the modules use an_
as a prefix in the name to avoid treating them as parameters.Slightly more detailed explanation: