These are chat archives for beniz/deepdetect

19th
Jan 2018
Yili Zhao
@panovr
Jan 19 2018 06:20
@beniz When finetuning, I found there are two ways:
  1. put weights in model object
    model = {
        'templates':model_templates,
        'repository':model_repository,
        'weights':model_weights
    }
    parameters_input = {
        'connector':'image',
        'width':img_width,
        'height':img_height}
    parameters_mllib = {
        'finetuning':True,
        'rotate':False,
        'template':model_name,
        'nclasses':class_num,
        'mirror':True
    }
  2. put weights in parameters_mlib
    model = {
         'templates':model_templates,
         'repository':model_repository
     }
     parameters_input = {
         'connector':'image',
         'width':img_width,
         'height':img_height}
     parameters_mllib = {
         'finetuning':True,
         'weights':model_weights,
         'rotate':False,
         'template':model_name,
         'nclasses':class_num,
         'mirror':True
     }
which one is correct?
Emmanuel Benazera
@beniz
Jan 19 2018 06:52
hi, API indicates model is the correct one, see https://www.deepdetect.com/api/
Yili Zhao
@panovr
Jan 19 2018 06:55

Yes, I just reference the model object from the API documentation.
However, using the first form, I got this error:

I0119 14:34:05.123258 14022 caffelib.cc:408] Using pre-trained weights from SE-ResNeXt-50.caffemodel
E0119 14:34:05.123301 14022 caffelib.cc:415] Error copying pre-trained weights
INFO - 14:34:05 - Network initialization done.
ERROR - 14:34:06 - service imgserv training status call failed

ERROR - 14:34:06 - {"code":500,"msg":"InternalError","dd_code":1007,"dd_msg":"src/caffe/util/io.cpp:67 / Check failed (custom): (fd) != (-1)"}

Any suggestions?

By the way, I have the model SE-ResNeXt-50.caffemodel in the model repository directory.
Emmanuel Benazera
@beniz
Jan 19 2018 07:00
have you tried an absolute path?
Yili Zhao
@panovr
Jan 19 2018 07:06
You mean set the absolute path for 'weights':model_weights?
Currently I just use the name SE-ResNeXt-50.caffemodel as parameter value.
Yili Zhao
@panovr
Jan 19 2018 07:24
@beniz When using an absolute path, that Error copying pre-trained weights disappear. Thanks!