Skip to content

L2 regularization problem #4

@heibanke

Description

@heibanke

hello, andersbll:

Thanks for your code. it is very useful for me.
i read your code and want to ask a question.

Line68 in layers.py:
self.dW = np.dot(self.last_input.T, output_grad)/n - self.weight_decay*self.W
In L2 regularization, i think this program need modify into
self.dW = np.dot(self.last_input.T, output_grad)/n + self.weight_decay*self.W
Would you tell me what you think to use "- self.weight_decay*self.W"?

B.R
heibanke

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