X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=README.md;h=869a1d97c09df81fd886168e78159bc56b7f8bdf;hb=59490d9da93f28283c79d44a5e7c791cbd623b24;hp=f2fac3072f987995918b3623cf66398cd8bc5c7b;hpb=79f9b2fc425c35c82e07db9cb762c2b04a992bdb;p=dagnn.git diff --git a/README.md b/README.md index f2fac30..869a1d9 100644 --- a/README.md +++ b/README.md @@ -56,14 +56,15 @@ The DAG can deal with modules which take as input and produce as output tensors and nested tables of tensors. If a node has a single predecessor, the output of the latter is taken -as-is as the input of the former. If it has multiple predecessors, all +as-is as the input to the former. If it has multiple predecessors, all the outputs are collected into a table, and the table is used as -input. The indexes of the outputs in that table reflects the order in -which the edges where created in the DAG:connect() commands. +input. The indexes of the outputs in that table reflect the +chronological order in which the edges where created in the +DAG:connect() commands. The input to the DAG (respectively the produced output) is a nested table of inputs reflecting the structure of the nested table of -modules provided to DAG:setInput (respectively DAG:setOutput) +modules given as argument to DAG:setInput (respectively DAG:setOutput) So for instance, in the example above, the model expects a tensor as input, since it is the input to the module a, and its output will is a @@ -79,11 +80,11 @@ Create a new empty DAG, which inherits from nn.Container. ### nn.DAG:connect([module1 [, module2 [, ...]]]) ### Add new nodes corresponding to the modules passed as arguments if they -are not already existing. Add edges between every two nodes -corresponding to a pair of successive modules in the arguments. +have not been already added in a previous call. Add edges between +every two nodes associated to two successive modules in the arguments. -Calling it with n > 2 arguments is strictly equivalent to calling it -n-1 times on the pairs of successive arguments. +Calling this function with n > 2 arguments is strictly equivalent to +calling it n-1 times on the pairs of successive arguments. ### nn.DAG:setInput(i) ###