This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
This layer expects an [n x d] Tensor and normalizes each | |
row to have unit L2 norm. | |
]]-- | |
local L2Normalize, parent = torch.class('nn.L2Normalize', 'nn.Module') | |
function L2Normalize:__init() | |
parent.__init(self) | |
end | |
function L2Normalize:updateOutput(input) |