Returns the factory function of the Torch class name. If the class name is invalid or if the class has no factory, then returns nil.

A Torch class is a class created with torch.class() or torch.newmetatable().

A factory function is able to return a new (empty) object of its corresponding class. This is helpful for object serialization.