Skip to content

Commit

Permalink
Merge pull request #405 from apaszke/bool
Browse files Browse the repository at this point in the history
Use bool for sizeAverage in SoftMarginCriterion
  • Loading branch information
soumith authored Dec 27, 2016
2 parents d3d21f5 + 0826d63 commit 4173b22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/THCUNN/generic/SoftMarginCriterion.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void THNN_(SoftMarginCriterion_updateOutput)(
THCTensor *input,
THCTensor *target,
THCTensor *output,
int sizeAverage)
bool sizeAverage)
{
THCUNN_check_nElement(state, input, target);
THCUNN_check_dim_size(state, output, 1, 0, 1);
Expand Down Expand Up @@ -37,7 +37,7 @@ void THNN_(SoftMarginCriterion_updateGradInput)(
THCTensor *input,
THCTensor *target,
THCTensor *gradInput,
int sizeAverage)
bool sizeAverage)
{
THCUNN_check_nElement(state, input, target);
THCUNN_assertSameGPU(state, 3, input, target, gradInput);
Expand Down
4 changes: 2 additions & 2 deletions lib/THCUNN/generic/THCUNN.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,14 +805,14 @@ TH_API void THNN_(SoftMarginCriterion_updateOutput)(
THCTensor *input,
THCTensor *target,
THCTensor *output,
int sizeAverage);
bool sizeAverage);

TH_API void THNN_(SoftMarginCriterion_updateGradInput)(
THCState *state,
THCTensor *input,
THCTensor *target,
THCTensor *gradInput,
int sizeAverage);
bool sizeAverage);

TH_API void THNN_(SoftMax_updateOutput)(
THCState *state,
Expand Down

0 comments on commit 4173b22

Please sign in to comment.