torch/image — pull request #25 by jonathantompson (2014-10-01 15:35:38+00:00)
Title: warp clamping

I added an extra input to image.warp to allow zero clamping when an input source sample goes off the image. FYI - in our work: perturbations using zero clamping give slightly better results for our models (however your mileage may vary).

Input source:
![Image of Lena](http://cims.nyu.edu/~tompson/misc/lena.png)

```clamp_mode='clamp'``` (default and old behaviour):
![Image of Lena](http://cims.nyu.edu/~tompson/misc/lena_clamp.png)

```clamp_mode='pad'``` (new mode):
![Image of Lena](http://cims.nyu.edu/~tompson/misc/lena_pad.png)

Note: The indentation of the warp c code was really messy (this was from a legacy implementation where I'm guessing people were using tabs for indent). I cleaned this up for better readability, but it means that the number of insertions and deletions is somewhat inflated.