Update extending_theano tutorial

Add a bit of information about infer_shape. What does it get as inputs? How do you use it? What should it return? An example?