diff --git a/models/openface/nn2.def.lua b/models/openface/nn2.def.lua index 2000246..11d64fc 100644 --- a/models/openface/nn2.def.lua +++ b/models/openface/nn2.def.lua @@ -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() diff --git a/models/openface/nn4.def.lua b/models/openface/nn4.def.lua index 35d4a7f..66a790a 100644 --- a/models/openface/nn4.def.lua +++ b/models/openface/nn4.def.lua @@ -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() diff --git a/training/donkey.lua b/training/donkey.lua index 05a1e8c..e9bace3 100644 --- a/training/donkey.lua +++ b/training/donkey.lua @@ -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) diff --git a/training/opts.lua b/training/opts.lua index 109e2de..d0b7888 100644 --- a/training/opts.lua +++ b/training/opts.lua @@ -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()