commit | 2555ac14d3896338fbfd8714f51c7b389c1ca9ac | [log] [tgz] |
---|---|---|
author | Soumith Chintala <soumith@gmail.com> | Wed Feb 10 00:48:08 2016 -0500 |
committer | soumith <soumith@gmail.com> | Wed Feb 10 11:19:57 2016 -0500 |
tree | 8c55b9ee365ee2ced63c947cfec3d5cc12abd99e | |
parent | 897d81b7bd949e7c671dffb095c53847f19c6378 [diff] |
moving Temporal* modules to THNN
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.