Added a section to the doc file Theano/doc/tutorial/extending_theano.txt that talk about as_op and gave an example.
Added infer_shape into example and fixed line syntax.
Fixed infer_shape method.
Fixed infer_shape.
Merge pull request #2030 from Tanjay94/As_Op

@as_op() documentation