Basic Neural Network as a service, written in Crystal.
Requires Crystal 0.27.0.
git clone [email protected]:suruja/learner.git
cd learner
shards install
crystal run src/learner.cr
Every value must be castable to Float64
. Either input, output or category must be castable to a vector, aka Array(Float64)
. Pass your query parameters in JSON format.
To create, replace or append your engine training data, you can either upload a CSV file (using ;
as separator) file containing one row per data item, of INPUT_SIZE
columns, resulting output in the last OUTPUT_SIZE
columns, or pass your JSON-encoded data in data
query parameter.
POST /:engine_id?input_size=INPUT_SIZE&output_size=OUTPUT_SIZE
Once your data (CSV file or data
query parameter) is successfully processed, you will get a token you must keep.
PATCH /:engine_id?input_size=INPUT_SIZE&output_size=OUTPUT_SIZE&token=TOKEN
Uploading CSV file or pass data
query parameter. You must provide the creation TOKEN
as query parameter.
PUT /:engine_id?input_size=INPUT_SIZE&output_size=OUTPUT_SIZE&token=TOKEN
Uploading CSV file or pass data
query parameter. You must provide the creation TOKEN
as query parameter.
DELETE /:engine_id?token=TOKEN
You must provide the creation TOKEN
as query parameter.
GET /:engine_id/run?value=VALUE
Run your engine with your VALUE
.
GET /:engine_id/classify?value=VALUE
Classify your VALUE
among the categories found in your data.
KEMAL_ENV=test crystal spec
- Fork it (https://github.com/suruja/learner/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- suruja - creator and maintainer