Added backward compatibity for graph with no self.nInputs.
Merge pull request #21 from fidlej/topic_backward_compatible_nInputs

Added backward compatibity for graph with no self.nInputs