Git Product home page Git Product logo

cuppa's People

Contributors

akshay-sharma avatar digital10111 avatar karan10111 avatar nareshsankapelly avatar roshan-nair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cuppa's Issues

two questions

great implementation for caffe model and kNN,but I have two questions:

  1. could you please instruct the algorithm for knn
  2. I did a tiny experiment as follows, when use predict api response nothing(http code:500):
    v1='[0.018448345363140106, 0.9855384826660156, 0.0005375780747272074, 0.016542669385671616, 0.0028725676238536835, 0.01883883588016033, 0.7837542295455933, 0.9421281814575195, 0.858430802822113, 0.06279351562261581, 0.019347021356225014, 0.93182772397995, 0.8539321422576904, 0.8034805655479431, 0.5766627788543701, 0.653766393661499, 0.016270926222205162, 0.9680255651473999, 0.9256700277328491, 0.9823125004768372, 0.99410480260849, 0.03165864199399948, 0.9952507615089417, 0.4026651382446289, 0.7379107475280762, 0.01387855876237154, 0.9996728301048279, 0.9999628067016602, 0.992577850818634, 0.9867085814476013, 0.21673664450645447, 0.9957020282745361, 0.0015155583387240767, 0.9227782487869263, 0.0008746151579543948, 0.9989007711410522, 0.08006580919027328, 0.0006333822384476662, 0.09225847572088242, 0.0005493158241733909, 0.0007938891067169607, 0.015284442342817783, 0.7659894824028015, 0.02385750040411949, 0.8482775092124939, 0.4759948253631592, 0.5717042088508606, 0.9377776384353638]'

import requests
import json
vec2 = json.loads(v1)

insert_request = {
"modelId":"model-2",
"operation": "insert",
"dataPointId": "1",
"vector": vec2,
"tags": ["g"]
}
response = requests.post('http://localhost:8000/v1/knn_model/update',
data= json.dumps(insert_request),
headers={'Content-Type': 'application/json'})
print(response.status_code)
print(response.content)

vec3 = json.loads(v1)
d4 = {"modelId":"model-2", "operation": "SearchByVector", "vector": vec3, "tags":["g"],"by":0}
response = requests.post('http://localhost:8000/v1/knn_model/predict',
data= json.dumps(d4),
headers={'Content-Type': 'application/json'})
print(response.status_code)
predictions = json.loads(response.content)
#ids_dists = predictions[u'result']
#ids_dists.reverse()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.