WebTorch takes advantage of the versatile LuaJIT compiler to bring together Nginx and Torch, creating an equivalent system to Tensorflow serve, but based on a RESTful API instead of protobuf. Multiple data formats are supported (tensors, images etc.)
Building (docker/nvidia-docker):
docker build -t webtorch .
Running daemon(docker/nvidia-docker):
docker run -p 3000:3000 -d webtorch
Running in debug(docker/nvidia-docker):
docker run -p 3000:3000 -it webtorch
Will train the XOR neural network with a single random (input1, input2) sample.
$ curl http://localhost:3000/v1/train
Body: 2D serialized Torch tensor (see benchmarks/script/train.lua
for example)
Will train the XOR neural network with a serialized 2D Torch tensor sample.
$ wrk -t12 -c400 -d30s -s benchmarks/scripts/train.lua http://localhost:3000/v1/train
Will get the result of the trained XOR network on (0.5, 0.5)
$ curl http://localhost:3000/v1/output