These are chat archives for beniz/deepdetect

22nd
Mar 2017
Ardalan
@ArdalanM
Mar 22 2017 14:40

Hi @beniz ,

Trying dd from the branch predlmdb. compilation went well.

loaded a trained model with this call:

curl -X PUT "http://localhost:8085/services/test-dd" -d "{\"mllib\":\"caffe\",\"description\":\"classification service\",\"type\":\"supervised\",\"parameters\":{\"input\":{\"connector\":\"svm\"},\"mllib\":{\"nclasses\":10}},\"model\":{\"repository\":\"/home/ardalan.mehrani/projects/pyDD/trained_model\"}}"

What should be the call for predicting from lmdb ? tried this but did not worked out:

curl -X POST "http://localhost:8085/predict" -d "{\"service\":\"test-dd\",\"parameters\":{\"mllib\":{\"gpu\":true,\"gpuid\":0}},\"data\":[\"/home/ardalan.mehrani/projects/pyDD/trained_model/train.lmdb\"]}"

ERROR - 14:39:06 - service test-dd mllib bad param: uri /home/ardalan.mehrani/projects/pyDD/trained_model/train.lmdb is a directory, requires a file in libSVM format
ERROR - 14:39:06 - Wed Mar 22 14:39:06 2017 UTC - 127.0.0.1 "POST /predict" 400 6

Emmanuel Benazera
@beniz
Mar 22 2017 15:19
@ArdalanM works for me, you may want to check that you are actually on the predlmdb branch...
Ardalan
@ArdalanM
Mar 22 2017 15:32
forgot to pull the branch ://///, now it works like a charm.
many thanks !
Ardalan
@ArdalanM
Mar 22 2017 16:28

@beniz, predicting from lmdb from a trained network seem to work (branch predlmdb).
However I am facing issues at training time.

service creation call:

{"parameters": {"input": {"connector": "svm"}, "output": {}, "mllib": {"gpu": true, "activation": "relu", "nclasses": 10, "db": true, "finetuning": false, "layers": [50], "gpuid": 0, "template": "mlp", "weights": false, "regression": false, "dropout": 0.5, "ntargets": null}}, "description": "pyDD_2017-03-22-16-21-54-555814", "type": "supervised", "mllib": "caffe", "model": {"templates": "../templates/caffe", "repository": "/tmp/pydd_cp1pz3vu"}}

train call:

{"data": ["/tmp/pydd_cp1pz3vu/x_train_2017-03-22-16-22-11-594125.svm", "/tmp/pydd_cp1pz3vu/x_val0_2017-03-22-16-22-11-808085.svm"], "parameters": {"input": {"db": true}, "output": {"measure": ["mcll", "accp"]}, "mllib": {"gpu": true, "net": {"batch_size": 128}, "class_weights": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1], "solver": {"lr_policy": null, "iterations": 10000, "test_interval": null, "test_initialization": true, "weight_decay": null, "gamma": 0.1, "base_lr": 0.01, "momentum": 0.9, "iter_size": 1, "snapshot_prefix": null, "solver_type": "SGD", "stepsize": 30, "snapshot": null, "power": null}}}, "service": "pyDD_2017-03-22-16-21-54-555814", "async": true}
{"status":{"code":201,"msg":"Created"},"head":{"method":"/train","job":1,"status":"running"}}

dd logs:

INFO - 16:22:12 - Ignoring source layer inputl
ERROR - 16:22:12 - Cannot share param 0 weights from layer 'ip0'; shape mismatch.  Source param shape is 50 63 (3150); target param shape is 50 63 (3150)
ERROR - 16:22:12 - service pydd_2017-03-22-16-21-54-555814 training status call failed

ERROR - 16:22:12 - {"code":500,"msg":"InternalError","dd_code":1007,"dd_msg":"./include/caffe/llogging.h:153 / Fatal Caffe error"}

INFO - 16:22:12 - Wed Mar 22 16:22:12 2017 UTC - 127.0.0.1 "GET /train?service=pyDD_2017-03-22-16-21-54-555814&job=1&timeout=1" 200 0
E0322 16:22:12.934187  6046 caffelib.cc:2001] Error creating model for prediction

ERROR - 16:22:12 - service pydd_2017-03-22-16-21-54-555814 mllib internal error: no model in /tmp/pydd_cp1pz3vu for initializing the net

ERROR - 16:22:12 - Wed Mar 22 16:22:12 2017 UTC - 127.0.0.1 "POST /predict" 500 7

Those calls work on master branch

Emmanuel Benazera
@beniz
Mar 22 2017 17:32
this has been fixed, it's in our Caffe, cleanup and rebuild