commit | db88a2b38b10e4ece8a323beb8259ee238c62aaa | [log] [tgz] |
---|---|---|
author | Andreas Köpf <andreas.koepf@xamla.com> | Mon Jan 25 23:23:02 2016 +0100 |
committer | Andreas Köpf <andreas.koepf@xamla.com> | Mon Feb 01 19:54:07 2016 +0100 |
tree | c49f1db588cc4defe4d9dec8528b1b1fb4dbf678 | |
parent | 1eea11e01955361d3afafa1374b7596867ca48a8 [diff] |
Add THNN conversion of {RReLU, Sigmoid, SmoothL1Criterion,SoftMax, SoftPlus}
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.