aboutsummaryrefslogtreecommitdiff
path: root/nerv/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nerv/init.lua')
-rw-r--r--nerv/init.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/nerv/init.lua b/nerv/init.lua
index ba6a08d..86494e3 100644
--- a/nerv/init.lua
+++ b/nerv/init.lua
@@ -1,13 +1,11 @@
---- NERV: a Lua-based toolkit for high-performance deep learning.
--- This file contains misc utility functions of NERV and finally initializes
--- NERV by including `init.lua` of other basic modules.
+--- Contains misc utility functions of NERV and finally initializes NERV by
+-- including `init.lua` of other basic modules.
-- @author Ted Yin <ted.sybil@gmail.com>
-- @module nerv
require 'libnerv'
---- Dummy function.
--- Display a friendly error message when user attempts to invoke a
+--- Display a friendly error message when user attempts to invoke a
-- non-implemented function.
function nerv.error_method_not_implemented()
nerv.error("method not implemented");
@@ -185,7 +183,7 @@ function nerv.include(filename)
return dofile(nerv.dirname(caller) .. filename)
end
---- Parse the command-line options and arguments
+--- Parse the command-line options and arguments.
-- @param argv the argrument list to parsed
-- @param options The specification of options, should be a list of tables,
-- each one for exactly one available option, say `v`, with `v[1]`, `v[2]`,
@@ -195,9 +193,10 @@ end
-- value and description of the option.
--
-- An example of specification:
--- ```{{"aaa", "a", "boolean", default = false, desc = "an option called aaa"},
--- {"bbb", "b", "boolean", default = true, desc = "bbb is set to be true if --bbb=no does not present"},
--- {"ccc", nil, "int", default = 0, desc = "ccc expects an integeral value"}}```
+--
+-- {{"aaa", "a", "boolean", default = false, desc = "an option called aaa"},
+-- {"bbb", "b", "boolean", default = true, desc = "bbb is set to be true if --bbb=no does not present"},
+-- {"ccc", nil, "int", default = 0, desc = "ccc expects an integeral value"}}
--
-- @return args, opts The non-option arguments and parsed options. `opts` is
-- again a list of tables, each of which corresponds to one table in parameter
@@ -311,7 +310,7 @@ function nerv.parse_args(argv, options, unordered)
return args, opts
end
---- Print usage information of the command-line options
+--- Print usage information of the command-line options.
-- @param options the list of options used in `parse_args`
function nerv.print_usage(options)
local full_maxlen = 0