-
Notifications
You must be signed in to change notification settings - Fork 6.8k
API doc improvement Dropout and SoftmaxActivation #6088
Conversation
src/operator/dropout.cc
Outdated
|
||
Example:: | ||
|
||
>>> mx.random.seed(998) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python examples should go the ndarray_doc.py if this is generic and need not be python specific. remove all the language specific constructs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
src/operator/softmax_activation.cc
Outdated
has at least 3 dimensions. | ||
This can be used for fully convolutional network, image segmentation, etc. | ||
|
||
Example:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, python examples shouldn't be here
"If set to channel, this operator will compute a num_channel-class softmax at " | ||
"each position of each instance; this can be used for fully convolutional network, " | ||
"image segmentation, etc."); | ||
.describe("Specifies how to compute the softmax. If set to ``instance``, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a note that this API is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note is added in softmax_activation.cc.
src/operator/dropout.cc
Outdated
.add_argument("data", "NDArray-or-Symbol", "Input data to dropout.") | ||
.describe(R"(Applies dropout operation to input array. | ||
|
||
- During training, each element of the input is randomly set to zero with probability p. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd omit "randomly" since you have probability with p in there.
src/operator/dropout.cc
Outdated
.describe(R"(Applies dropout operation to input array. | ||
|
||
- During training, each element of the input is randomly set to zero with probability p. | ||
The whole array is rescaled by :math:`1/(1-p)` to keep the expectated sum of the input unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"expectated" -> "expected" (expectated not a word in English although it apparently was a word in Latin :P)
src/operator/dropout.cc
Outdated
[[ 3. 0.5 -0.5 2. 7. ] | ||
[ 2. -0.4 7. 3. 0.2 ]] | ||
)" ADD_FILELINE) | ||
.add_argument("data", "NDArray-or-Symbol", "Input array to apply dropout operation.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> "Input array to which dropout will be applied."
src/operator/softmax_activation.cc
Outdated
If `mode` = ``channel``, this operator will compute a k-class softmax at each position | ||
of each instance, where `k` = ``num_channel``. This mode can only be used when the input array | ||
has at least 3 dimensions. | ||
This can be used for fully convolutional network, image segmentation, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change -> "This can be used for a full-convolutional network..."
* doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix
* doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix
* updated docstring for set_lr_mult and set_wd_mult * updated docstring per review * Fixed imdecode crash bug when flag=0 (#6134) * Fix (#6131) * Docs for MXRecordIO, MXIndexedRecordIO modified (#6013) * docs for MXIndexedRecordIO modified * changes after review * recordIO doc modified * changes after review * lint error * minor change * minor change after review * empty commit to retrigger build * changes after review * Update documentation for mx.callback.Speedometer. (#6058) * Update documentation for mx.callback.Speedometer. * Minor doc changes. * Use module instead of model in example code. * update doc for Load (#6092) * Installation instructions for MacOS and Cloud (#6012) * Fix NDArray bool checking (#6130) * fix shape order bug (#6136) * TOC click unfold (#6133) * [doc] new sphnix plugin (#6105) * update doc * rm * update * update ndarray * update mds * update * update * update * update * update * update * update image.md and others * update * [doc] use debug mode to build (#6151) * move ctc loss to contrib (#6154) * Fix for invalid numpy float indexing (#6144) * Fix python3 compatibilities (#6143) * [doc] small changes to tutorials (#6164) * [doc] Fix left toc link (#6162) * [example]ADD practical functions and options for speech_recognition example (#6141) * ADD practical functions and options for speech_recognition example * add missing stt_bi_graphemes_util.py and deepspeech.cfg template * Added reflection padding (#6123) * Added reflection padding * Lint fix * Added 5d reflection padding * Added failure in forward/backward for input dimensions other than 4 of 5 * Improved sanity check readability * Fixing LICENSE file and adding NOTICE (#6172) * Creating NOTICE. When code moves to Apache, it will need adjusting to the Apache format. * Replacing source header with full license text * doc improvement - softmax, metrics, and initializer (#5945) * doc improvement, softmaxoutput, initializer-constant, minor fixes * doc improvement, metrics * fix softmax doc, fix metric lint * softmax more fixes * add doc change in initializer.py. some minor fix in softmax_cross_entropy * doc change in initializer.py * fix grammer * fix * fix * fix * minor fix * fix * minor fix * DataBatch and NDArrayIter doc modified (#6091) * DataBatch and NDArrayIter doc modified * fixes after review * fixes after review * wording changed * some more fixes * improvement * desc fix * Datadesc info added * minor addition * fix * fix * fix after review * [Scala] Change version to 0.9.5-SNAPSHOT (#6173) * [scala] change version to 0.9.5-SNAPSHOT * API doc improvement Dropout and SoftmaxActivation (#6088) * doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix * Update documentation for mx.callback.do_checkpoint (#6059) * Update documentation for mx.callback.do_checkpoint * Use module instead of model for example code. * Update documentation for plot_graph. (#6098) * Update documentation for plot_graph. * Minor doc fix. * Restruct get started (#6167) * Change get started page * Small fix * Improve * Update documentation of Initializer.dumps() (#6128) * Doc Improvement - RMSProp and RMSPropAlex (#6107) * rmsprop * rmsprop alex * add link in optimizer.py * fix * fix * missed fix.. * Docforcs,fft,ifft (#6145) * fft.cc * add all * changed the description of set_lr_mult and set_wd_mult * Explicitly specify quiet in R install_version (#6171)
* doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix
* updated docstring for set_lr_mult and set_wd_mult * updated docstring per review * Fixed imdecode crash bug when flag=0 (apache#6134) * Fix (apache#6131) * Docs for MXRecordIO, MXIndexedRecordIO modified (apache#6013) * docs for MXIndexedRecordIO modified * changes after review * recordIO doc modified * changes after review * lint error * minor change * minor change after review * empty commit to retrigger build * changes after review * Update documentation for mx.callback.Speedometer. (apache#6058) * Update documentation for mx.callback.Speedometer. * Minor doc changes. * Use module instead of model in example code. * update doc for Load (apache#6092) * Installation instructions for MacOS and Cloud (apache#6012) * Fix NDArray bool checking (apache#6130) * fix shape order bug (apache#6136) * TOC click unfold (apache#6133) * [doc] new sphnix plugin (apache#6105) * update doc * rm * update * update ndarray * update mds * update * update * update * update * update * update * update image.md and others * update * [doc] use debug mode to build (apache#6151) * move ctc loss to contrib (apache#6154) * Fix for invalid numpy float indexing (apache#6144) * Fix python3 compatibilities (apache#6143) * [doc] small changes to tutorials (apache#6164) * [doc] Fix left toc link (apache#6162) * [example]ADD practical functions and options for speech_recognition example (apache#6141) * ADD practical functions and options for speech_recognition example * add missing stt_bi_graphemes_util.py and deepspeech.cfg template * Added reflection padding (apache#6123) * Added reflection padding * Lint fix * Added 5d reflection padding * Added failure in forward/backward for input dimensions other than 4 of 5 * Improved sanity check readability * Fixing LICENSE file and adding NOTICE (apache#6172) * Creating NOTICE. When code moves to Apache, it will need adjusting to the Apache format. * Replacing source header with full license text * doc improvement - softmax, metrics, and initializer (apache#5945) * doc improvement, softmaxoutput, initializer-constant, minor fixes * doc improvement, metrics * fix softmax doc, fix metric lint * softmax more fixes * add doc change in initializer.py. some minor fix in softmax_cross_entropy * doc change in initializer.py * fix grammer * fix * fix * fix * minor fix * fix * minor fix * DataBatch and NDArrayIter doc modified (apache#6091) * DataBatch and NDArrayIter doc modified * fixes after review * fixes after review * wording changed * some more fixes * improvement * desc fix * Datadesc info added * minor addition * fix * fix * fix after review * [Scala] Change version to 0.9.5-SNAPSHOT (apache#6173) * [scala] change version to 0.9.5-SNAPSHOT * API doc improvement Dropout and SoftmaxActivation (apache#6088) * doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix * Update documentation for mx.callback.do_checkpoint (apache#6059) * Update documentation for mx.callback.do_checkpoint * Use module instead of model for example code. * Update documentation for plot_graph. (apache#6098) * Update documentation for plot_graph. * Minor doc fix. * Restruct get started (apache#6167) * Change get started page * Small fix * Improve * Update documentation of Initializer.dumps() (apache#6128) * Doc Improvement - RMSProp and RMSPropAlex (apache#6107) * rmsprop * rmsprop alex * add link in optimizer.py * fix * fix * missed fix.. * Docforcs,fft,ifft (apache#6145) * fft.cc * add all * changed the description of set_lr_mult and set_wd_mult * Explicitly specify quiet in R install_version (apache#6171)
* doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix
* updated docstring for set_lr_mult and set_wd_mult * updated docstring per review * Fixed imdecode crash bug when flag=0 (apache#6134) * Fix (apache#6131) * Docs for MXRecordIO, MXIndexedRecordIO modified (apache#6013) * docs for MXIndexedRecordIO modified * changes after review * recordIO doc modified * changes after review * lint error * minor change * minor change after review * empty commit to retrigger build * changes after review * Update documentation for mx.callback.Speedometer. (apache#6058) * Update documentation for mx.callback.Speedometer. * Minor doc changes. * Use module instead of model in example code. * update doc for Load (apache#6092) * Installation instructions for MacOS and Cloud (apache#6012) * Fix NDArray bool checking (apache#6130) * fix shape order bug (apache#6136) * TOC click unfold (apache#6133) * [doc] new sphnix plugin (apache#6105) * update doc * rm * update * update ndarray * update mds * update * update * update * update * update * update * update image.md and others * update * [doc] use debug mode to build (apache#6151) * move ctc loss to contrib (apache#6154) * Fix for invalid numpy float indexing (apache#6144) * Fix python3 compatibilities (apache#6143) * [doc] small changes to tutorials (apache#6164) * [doc] Fix left toc link (apache#6162) * [example]ADD practical functions and options for speech_recognition example (apache#6141) * ADD practical functions and options for speech_recognition example * add missing stt_bi_graphemes_util.py and deepspeech.cfg template * Added reflection padding (apache#6123) * Added reflection padding * Lint fix * Added 5d reflection padding * Added failure in forward/backward for input dimensions other than 4 of 5 * Improved sanity check readability * Fixing LICENSE file and adding NOTICE (apache#6172) * Creating NOTICE. When code moves to Apache, it will need adjusting to the Apache format. * Replacing source header with full license text * doc improvement - softmax, metrics, and initializer (apache#5945) * doc improvement, softmaxoutput, initializer-constant, minor fixes * doc improvement, metrics * fix softmax doc, fix metric lint * softmax more fixes * add doc change in initializer.py. some minor fix in softmax_cross_entropy * doc change in initializer.py * fix grammer * fix * fix * fix * minor fix * fix * minor fix * DataBatch and NDArrayIter doc modified (apache#6091) * DataBatch and NDArrayIter doc modified * fixes after review * fixes after review * wording changed * some more fixes * improvement * desc fix * Datadesc info added * minor addition * fix * fix * fix after review * [Scala] Change version to 0.9.5-SNAPSHOT (apache#6173) * [scala] change version to 0.9.5-SNAPSHOT * API doc improvement Dropout and SoftmaxActivation (apache#6088) * doc improve for dropout oper * doc improve for SoftmaxActivation oper * fix * fix * Update documentation for mx.callback.do_checkpoint (apache#6059) * Update documentation for mx.callback.do_checkpoint * Use module instead of model for example code. * Update documentation for plot_graph. (apache#6098) * Update documentation for plot_graph. * Minor doc fix. * Restruct get started (apache#6167) * Change get started page * Small fix * Improve * Update documentation of Initializer.dumps() (apache#6128) * Doc Improvement - RMSProp and RMSPropAlex (apache#6107) * rmsprop * rmsprop alex * add link in optimizer.py * fix * fix * missed fix.. * Docforcs,fft,ifft (apache#6145) * fft.cc * add all * changed the description of set_lr_mult and set_wd_mult * Explicitly specify quiet in R install_version (apache#6171)
Add Dropout and SoftmaxActivation.
@zackchase @madjam @nswamy @Roshrini @mli
Thanks for reviewing my PR!
Note: Confirmed with Eric SoftmaxActivation will be deprecated.