diff options
author | Dominik Grewe <dominikg@google.com> | 2015-04-28 18:07:32 +0300 |
---|---|---|
committer | Dominik Grewe <dominikg@google.com> | 2015-04-28 18:36:55 +0300 |
commit | d0da63e83825d4631a7f299766a1fa968eb5ccd3 (patch) | |
tree | edab79c4cf664ef0dac24fb851923059027e659e /CrossEntropyCriterion.lua | |
parent | 485dd619695c47e49ab56ff518edad52b74475fc (diff) |
Make type() truly recursive.
Recursively iterate over the whole table, converting each tensor to the
given type. Removes need for many specialized type() functions.
Diffstat (limited to 'CrossEntropyCriterion.lua')
-rw-r--r-- | CrossEntropyCriterion.lua | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/CrossEntropyCriterion.lua b/CrossEntropyCriterion.lua index 2b3c78c..d4d19e5 100644 --- a/CrossEntropyCriterion.lua +++ b/CrossEntropyCriterion.lua @@ -25,11 +25,4 @@ function CrossEntropyCriterion:updateGradInput(input, target) return self.gradInput end -function CrossEntropyCriterion:type(name) - Criterion.type(self, name) - self.lsm:type(name) - self.nll:type(name) - return self -end - return nn.CrossEntropyCriterion |