deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.59k stars 5.43k forks source link

Failed to "Training Data" part 4 "Fine-turn the above Softmax model with Triplet loss". #961

Open chaohuazhu opened 5 years ago

chaohuazhu commented 5 years ago

Hi,everyone.I'm having a problem with the replication of "Training Data" part 4 "Fine-turn the above Softmax model with Triplet loss". CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train.py --network m1 --loss triplet --lr 0.005 --pretrained ./models/m1-softmax-emore,1 return is "LocalFileSystem::Open "./models/m1-softmax-emore,1-symbol.json": No such file or directory". so I ivoked "CUDA_VISIBLE_DEVICES='0,1' python -u train.py --network m1 --loss triplet --lr 0.005 --pretrained ./models/m1-softmax-emore/model" return is: File "/usr/lib/python2.7/site-packages/mxnet/module/module.py", line 593, in forward assert self.binded and self.params_initialized AssertionError Question:

  1. What is "m1-softmax-emore,1"?
  2. Where to call bind function? Thanks.
ghost commented 5 years ago
  1. You solved it by the second --pretrained param
  2. https://github.com/deepinsight/insightface/issues/542
chaohuazhu commented 5 years ago

Thanks, @phuonglk. It works! In train.py after model = mx.mod.Module( context=ctx, symbol=sym, ) add model.bind([("data", (args.batch_size, args.image_channel, image_size[0], image_size[1]))], [("softmax_label", (args.batch_size,))])