torch/nngraph — pull request #34 by fidlej (2014-08-19 11:05:53+00:00)
Title: Added nn.ModuleFromCriterion to wrap a called Criterion.

@wojciechz @koraykv
I took an inspiration from Wojciech.
And I provided the support for Criterions inside of a nngraph.
A Criterion is automatically wrapped by a module,
when converting the criterion to a node.

Is this support matching your needs?