diff options
-rw-r--r-- | gmodule.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gmodule.lua b/gmodule.lua index 2a367d4..e5bd4d4 100644 --- a/gmodule.lua +++ b/gmodule.lua @@ -220,6 +220,10 @@ local function recursiveType(param, type_str) end function gModule:type(type, tensorCache) + if not type then + return self._type + end + tensorCache = tensorCache or {} local function applyTypeToTable(table) @@ -244,6 +248,7 @@ function gModule:type(type, tensorCache) end end + self._type = type return self end |