| commit | 687400c4fda8381fc97298f44ec4fc9546be1e5a | [log] [tgz] |
|---|---|---|
| author | soumith <soumith@fb.com> | Fri Feb 19 10:31:42 2016 -0800 |
| committer | soumith <soumith@fb.com> | Fri Feb 19 15:38:18 2016 -0800 |
| tree | c0061904a07dbea4cfcc67a54c8bd717b88792c6 | |
| parent | a5dd23e000a1e8c6622946d27b739b3c23047d29 [diff] |
adding paddingValue to LookupTable
All functions should accept arguments in the following order. Dots represent any module-specific parameters or buffers, disregarding whether they are used for writing or reading. They should follow the order
[weight], [bias], [any buffers], [additional arguments], [optional arugments]
updateOutput: state, input, output, ... updateGradInput: state, input, gradOutput, gradInput, ... accGradParameters: state, input, gradOutput, [gradWeight], [gradBias], ...
e.g.
void THNN_(HardShrink_updateGradInput)( THNNState* state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, real lambda)
updateOutput: state, input, target, output, ... updateGradInput: state, input, target, gradInput, ...
e.g.
void THNN_(ClassNLLCriterion_updateOutput)( THNNState* state, THTensor *input, THLongTensor *target, THTensor *output, THTensor *weights, THTensor *total_weight, bool sizeAverage)
void THNN_Linear_updateOutput( THTensor *input, THTensor *output, THTensor *weight, THTensor *bias); //<- 10 ->
All arguments should start on a new line after function name, and they should be indented using 10 spaces.
Use 2 spaces for block indentation.