getParameters can return empty tensor

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

getParameters can return empty tensor