Welcome to mirror list, hosted at ThFree Co, Russian Federation.

JustTable.lua - github.com/torch/nngraph.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1fc84348d0b91b351a96711bdd60147db4a65c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

local JustTable, parent = torch.class('nngraph.JustTable', 'nn.Module')
function JustTable:__init()
   self.output = {}
end

-- The input is one element.
-- The output is a table with one element: {element}
function JustTable:updateOutput(input)
   self.output[1] = input
   return self.output
end

function JustTable:updateGradInput(input, gradOutput)
   self.gradInput = gradOutput[1]
   return self.gradInput
end