karpathy / karpathy/convnetjs

Backprop zeroing on FullyConnLayer

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11.2k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

I'm curious why the input gradients are zero'd out in FullyConnLayer.backward() and not the biases and filter gradients.

So zero out input, filter and bias gradients like this:

```
backward: function() {
var V = this.in_act;
V.dw = global.zeros(V.w.length); // zero out the gradient in input Vol

// compute gradient wrt weights and data
for(var i=0;i

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.