karpathy / karpathy/convnetjs

MaxoutLayer uses different options to initialize "switches" array depending on fromJSON or base constructor

Open
#24 0 comments 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

Hello All -

Was wondering if this was intended behavior? Been reading the source over the holidays and noticed that in the MaxOut's constructor:

(convnet_layers_nonlinearities.js:128)
this.switches = global.zeros(**_this.out_sx_this.out_sy*this.out_depth***); // useful for backprop

Which doesn't seem to match with the from_json initialization:

(convnet_layers_nonlinearities.js:224)
this.switches = global.zeros(this.group_size);

Was wondering if this was a bug or maybe you could educate me on why the switches would be a different size in this case?

Thankyou.

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.