These are chat archives for beniz/deepdetect

25th
May 2017
alkollo
@alkollo
May 25 2017 06:11
ok thanks for the tips.

hello,

I wanted to change crop size for a model train.
I use resnet-50.

Creating service :

curl -X PUT "http://localhost:8080/services/imageserv_resnet_50" -d '{
"mllib":"caffe",
"description":"image classification service r50",
"type":"supervised",
"parameters":{
"input":{
"connector":"image",
"width":320,
"height":320
},
"mllib":{
"template":"resnet_50",
"nclasses":137
}
},
"model":{
"templates":"/home/webuchronie/deepdetect/templates/caffe",
"repository":"/home/webuchronie/deepdetect/templates/caffe/my_resnet_50"
}
}'

Then launching train :

curl -X POST "http://localhost:8080/train" -d '{
"service":"imageserv_resnet_50",
"async":true,
"parameters":{
"mllib":{
"gpu":true,
"net":{
"batch_size":16
},
"solver":{
"test_interval":1000,
"iterations":50000,
"base_lr":0.1,
"stepsize":320000,
"gamma":0.96
}
},
"input":{
"connector":
"image",
"test_split":0.1,
"shuffle":true,
"width":320,
"height":320
},
"output":{
"measure":["acc","acc-5","mcll","f1"]
}
},
"data":["/home/imageset/birds"]
}'

At the time of training I got error:

ERROR - 05:29:11 - Cannot share param 0 weights from layer 'fc1000'; shape mismatch. Source param shape is 137 2048 (280576); target param shape is 137 32768 (4489216)

googling a little bit teached me that there was an error beetween crop size and train size

I have checked my resnet_50.prototxt and found this:

transform_param {
mirror: true
crop_size: 224
mean_file: "mean.binaryproto"
}

I tryed to replace it with 320, but still get an error, not the same but didn't copyed it.

Seems dede doesn't change this value at the service creation time or I missed something.

kind regards,

Emmanuel Benazera
@beniz
May 25 2017 08:23
are you using a pre trained network ?
alkollo
@alkollo
May 25 2017 09:27
no, I'm training my own
Emmanuel Benazera
@beniz
May 25 2017 17:15
I don't think you are using cropping based on the calls you've passed. Look at the API, that requires a crop_size parameter to be set.
roysG
@roysG
May 25 2017 17:19
In case i want to make predict by GPU, do i need to define some parameter for that when i create service or send POST ?
Emmanuel Benazera
@beniz
May 25 2017 17:20
It's all here: https://deepdetect.com/api/?python#prediction-from-service including the gpu parameter
roysG
@roysG
May 25 2017 17:32

So if i want to make the POST in curl then the parameter: parameters_mllib = {'gpu':True}

Will be:

curl -X POST "http://localhost:8080/predict" -d "{\"mllib\":\"{\"gpu\":True} ,\"service\":\"imageserv\",\"parameters\":{\"input\":{\"width\":224,\"height\":224},\"output\":{\"best\":3}},\"data\":[\"http://i.ytimg.com/vi/0vxOhd4qlnA/maxresdefault.jpg\"]}"

?/

??
roysG
@roysG
May 25 2017 17:47
Ok i find the answer.