Given a string, returns a metatable corresponding to the Torch class described by string. Returns nil if the class does not exist.

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

Example:

> for k,v in pairs(torch.getmetatable("torch.CharStorage")) do print(k,v) end
__index__       function: 0x1a4ba80
__typename      torch.CharStorage
write   function: 0x1a49cc0
__tostring__    function: 0x1a586e0
__newindex__    function: 0x1a4ba40
string  function: 0x1a4d860
__version       1
copy    function: 0x1a49c80
read    function: 0x1a4d840
__len__ function: 0x1a37440
fill    function: 0x1a375c0
resize  function: 0x1a37580
__index table: 0x1a4a080
size    function: 0x1a4ba20