Move imgDim to models.

This commit is contained in:
Brandon Amos 2016-01-11 16:38:24 -05:00
parent 27f71cdf5d
commit 5f78673b7d
4 changed files with 7 additions and 3 deletions

View File

@ -22,6 +22,8 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
imgDim = 224
function createModel()
local net = nn.Sequential()

View File

@ -22,6 +22,8 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
imgDim = 96
function createModel()
local net = nn.Sequential()

View File

@ -25,8 +25,8 @@ if not os.execute('cd ' .. opt.data) then
error(("could not chdir to '%s'"):format(opt.data))
end
local loadSize = {3, opt.imgDim, opt.imgDim}
local sampleSize = {3, opt.imgDim, opt.imgDim}
local loadSize = {3, imgDim, imgDim}
local sampleSize = {3, imgDim, imgDim}
-- function to load the image, jitter it appropriately (random crops etc.)
local trainHook = function(self, path)

View File

@ -45,7 +45,7 @@ function M.parse(arg)
---------- Model options ----------------------------------
cmd:option('-retrain', 'none', 'provide path to model to retrain with')
cmd:option('-modelDef', '../models/openface/nn4.def.lua', 'path to model definiton')
cmd:option('-imgDim', 96, 'Image dimension. nn2=224, nn4=96')
-- cmd:option('-imgDim', 96, 'Image dimension. nn2=224, nn4=96') Provided by model def.
cmd:option('-embSize', 128, 'size of embedding from model')
cmd:option('-alpha', 0.2, 'margin in TripletLoss')
cmd:text()