Skip to content

Instantly share code, notes, and snippets.

@seeb0h
Created June 28, 2016 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seeb0h/784a1d15da25f968ce8cb4aa305d3cec to your computer and use it in GitHub Desktop.
Save seeb0h/784a1d15da25f968ce8cb4aa305d3cec to your computer and use it in GitHub Desktop.

#Get model

mkdir -p /opt/deepdetect/models/lenet-mnist
wget https://raw.githubusercontent.com/mravendi/caffe-test-mnist-jpg/master/model/lenet_iter_10000.caffemodel -O /opt/deepdetect/models/lenet-mnist/lenet-mnist.caffemodel

#Set service

cd /opt/deepdetect/clients/python
python
from dd_client import DD
dd = DD('localhost')
dd.set_return_format(dd.RETURN_PYTHON)
description = 'digit classification service'
mllib = 'caffe'
model = {'templates':'../templates/caffe/','repository':'../models/lenet-mnist'}
parameters_input = {'connector':'image'}
parameters_mllib = {'template':'LeNet','nclasses':10}
parameters_output = {}
dd.put_service('lenet-mnist' ,model, description, mllib, parameters_input, parameters_mllib, parameters_output)

Error : {u'status': {u'msg': u'BadRequest', u'dd_msg': u'Service Bad Request Error', u'code': 400, u'dd_code': 1006}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment