test: fix torch.Tester warnings
test: fix torch.Tester warnings

- tensors with same content but different dimensions
- assert should only be used for boolean conditions

See torch/torch7#562

Moodstocks/image,torch/image