Checked the gradInput sizes.
Merge pull request #30 from fidlej/topic_check_gradInput_sizes

Checked the gradInput sizes.