@@ -172,11 +172,17 @@ class Network {
172
172
// and should not be deleted by any of the networks.
173
173
// Returns the number of weights initialized.
174
174
virtual int InitWeights (float range, TRand* randomizer);
175
- // Changes the number of outputs to the size of the given code_map, copying
176
- // the old weight matrix entries for each output from code_map[output] where
177
- // non-negative, and uses the mean (over all outputs) of the existing weights
178
- // for all outputs with negative code_map entries. Returns the new number of
179
- // weights. Only operates on Softmax layers with old_no outputs.
175
+ // Changes the number of outputs to the outside world to the size of the given
176
+ // code_map. Recursively searches the entire network for Softmax layers that
177
+ // have exactly old_no outputs, and operates only on those, leaving all others
178
+ // unchanged. This enables networks with multiple output layers to get all
179
+ // their softmaxes updated, but if an internal layer, uses one of those
180
+ // softmaxes for input, then the inputs will effectively be scrambled.
181
+ // TODO(rays) Fix this before any such network is implemented.
182
+ // The softmaxes are resized by copying the old weight matrix entries for each
183
+ // output from code_map[output] where non-negative, and uses the mean (over
184
+ // all outputs) of the existing weights for all outputs with negative code_map
185
+ // entries. Returns the new number of weights.
180
186
virtual int RemapOutputs (int old_no, const std::vector<int >& code_map) {
181
187
return 0 ;
182
188
}
0 commit comments