separated caffe into with gradInput and without