irange and istdev modification to deal with 2D layers
Finished updating set_input_space to work in the 2D layer scenario