Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/convnet_layers_pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
var n=0; // a counter for switches
for(var d=0;d<this.out_depth;d++) {
var x = -this.pad;
var y = -this.pad;
for(var ax=0; ax<this.out_sx; x+=this.stride,ax++) {
y = -this.pad;
var y = -this.pad;
for(var ay=0; ay<this.out_sy; y+=this.stride,ay++) {

// convolve centered at this particular location
Expand Down Expand Up @@ -76,16 +75,11 @@

var n = 0;
for(var d=0;d<this.out_depth;d++) {
var x = -this.pad;
var y = -this.pad;
for(var ax=0; ax<this.out_sx; x+=this.stride,ax++) {
y = -this.pad;
for(var ay=0; ay<this.out_sy; y+=this.stride,ay++) {

for(var ax=0; ax<this.out_sx; ax++) {
for(var ay=0; ay<this.out_sy; ay++) {
var chain_grad = this.out_act.get_grad(ax,ay,d);
V.add_grad(this.switchx[n], this.switchy[n], d, chain_grad);
n++;

}
}
}
Expand Down