Skip to content

SoftMaxTree updateGradInput problem after unserializing a model previously serialized by calling dpnn.Serial():mediumSerial() #47

@pyadolla

Description

@pyadolla

Using nnx.SoftmaxTree() in a model saved using the module dpnn.Serial():mediumSerial() causes gradInput table to be cleared. This is a problem because if you'd like to unserialize the model and then continue training where you left off, then the return of updateGradInput is going to be an empty table. One fix would be to modify the code block at SoftmaxTree.lua:181 to say something like,

if self.gradInput then
    if #self.gradInput==0 then
        self.gradInput = {self._gradInput, self._gradTarget}
    end
    input.nn.SoftMaxTree_updateGradInput(self, input, gradOutput, target)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions