getParameters can return an empty tensor

If parameters() is not defined or returns an empty table, the method
getParameters() will return an empty tensor.
Merge pull request #60 from sergomezcol/master

getParameters can return an empty tensor