fix subgradient batch bug and add a test
subgradient test: add another check
Merge pull request #111 from martinsch/subgradient_batch_fix

fix subgradient batch bug and add a test