Skip to content

Commit

Permalink
Merge pull request apache#82 from piiswrong/master
Browse files Browse the repository at this point in the history
fix upsampling plan
  • Loading branch information
piiswrong committed Dec 5, 2015
2 parents 00ca771 + 203f116 commit a108c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mshadow/extension/spatial_upsampling_nearest.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct Plan<UpSamplingNearestExp<SrcExp, DType, srcdim>, DType> {
: src_(MakePlan(e.src_)),
scale_(e.scale_),
new_height_(e.shape_[srcdim - 2]),
src_height_(static_cast<index_t>(e.shape_[srcdim - 2] / 2)) {}
src_height_(static_cast<index_t>(e.shape_[srcdim - 2] / e.scale_)) {}
MSHADOW_XINLINE DType Eval(index_t i, index_t j) const {
const index_t x = j;
const index_t y = i % new_height_;
Expand Down

0 comments on commit a108c40

Please sign in to comment.