> @jeffdonahue why don't you use caffe_set again?

I wasn't using it because it wasn't defined for `int`s, but I just pushed another commit to do that, so now using `caffe_set` again as suggested. 

>  Also I don't think you need to initialize top_mask since later you are going to copy max_idx_ over it.

What do you mean by this?  I initialize and write to either (but not both) max_idx_ or the blob in top[1], depending on whether top has size > 1.