Optimize over a slice of the data

Not sure but this might help Slicing input Variables and backpropagation