DNN Models: Add parameters as comment and use opt.embSize

This commit is contained in:
Brandon Amos 2016-01-08 11:18:30 -05:00
parent 1bac754aca
commit 2b249d02e6
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
-- Model: nn2.def.lua
-- Description: Implementation of NN2 from the FaceNet paper.
-- Input size: 3x224x224
-- Number of Parameters from net:getParameters() with embSize=128: 7472144
-- Components: Mostly `nn`
-- Devices: CPU and CUDA
--
@ -169,7 +170,7 @@ function createModel()
-- net:add(nn.Reshape(1024))
net:add(nn.View(1024))
net:add(nn.Linear(1024, 128))
net:add(nn.Linear(1024, opt.embSize))
net:add(nn.Normalize(2))
return net

View File

@ -1,6 +1,7 @@
-- Model: nn4.def.lua
-- Description: Implementation of NN4 from the FaceNet paper.
-- Input size: 3x96x96
-- Number of Parameters from net:getParameters() with embSize=128: 6959088
-- Components: Mostly `nn`
-- Devices: CPU and CUDA
--
@ -169,7 +170,7 @@ function createModel()
-- net:add(nn.Reshape(896))
net:add(nn.View(896))
net:add(nn.Linear(896, 128))
net:add(nn.Linear(896, opt.embSize))
net:add(nn.Normalize(2))
return net