1
0
Fork 0
mirror of synced 2024-06-26 18:20:26 +12:00
waifu2x/lib/Print.lua

16 lines
372 B
Lua
Raw Normal View History

2018-08-29 08:47:45 +12:00
local Print, parent = torch.class('w2nn.Print','nn.Module')
function Print:__init()
parent.__init(self)
end
function Print:updateOutput(input)
print(input:size())
self.output:resizeAs(input)
self.output:copy(input)
return self.output
end
function Print:updateGradInput(input, gradOutput)
self.gradInput:resizeAs(GradOutput)
return self.gradInput
end