dianne - a distributed deep learning framework on osgi - tim verbelen
TRANSCRIPT
A TRULY SMART SYSTEM IS ABLE TO LEARN
Image captioning (Vinyals et al)
Speech synthesis (van den Oord et al)
Speech recognition systems
AlphaGo(Silver et al.)
Robot tasks (Abbeel et al)
MACHINE LEARNING WITH DEEP NEURAL NETWORKS
4
Neural networks are trained to approximate any functionDifficulties:
Requires a lot of computationRequires a huge amount of data
GPU / CLOUD COMPUTING
INTERNET OF THINGS
WHERE TO DEPLOY?
5
DISTRIBUTED INFRASTRUCTURE REQUIRES DISTRIBUTED SOLUTION
IoT gateway
Cloud
Sensor/Edge nodes
End-user devices
IMAGE DIVIDER. POSITION THE TITLE ACCORDING TO THE IMAGE. USE THE WHITE TITLE FOR DARK IMAGES.
KEY PRINCIPLES
MODULARITY IN DIANNE (2)
9
MODULAR BUILDING BLOCKS FOR LEARNING AND EVALUATING NEURAL NETWORKS
NeuralNetworkRepository
Dataset
Learner Evaluator Agent
IMAGE DIVIDER. POSITION THE TITLE ACCORDING TO THE IMAGE. USE THE WHITE TITLE FOR DARK IMAGES.
DEMO TOUR
REMOTE SERVICES
13
A B
RSA RSA
exportServiceimportService
CALLING OSGI SERVICES ON DISTRIBUTED INFRASTRUCTURE
14
public class NeuralNetworkInstanceDTO {
public UUID id;
public String description;
public String name;
public Map<UUID, ModuleInstanceDTO> modules;
}
public interface NeuralNetwork {
UUID getId();
NeuralNetworkInstanceDTO getNeuralNetworkInstance();
Promise<NeuralNetworkResult> forward(...);
Promise<NeuralNetworkResult> backward(...);
...}
DATA
BEHAVIO
R
DTOSERVICE
DTOSSPLITTING DATA FROM BEHAVIOR
DTOS (2)
15
GREAT FOR CONFIGURATION
public class SGDConfig {
public float learningRate = 0.01f;public float minLearningRate = 0.0f;public float decayRate = 0.0f;…
}
Map<String, String> config …SGDConfig c = DianneConfigHandler
.getConfig(config, SGDConfig.class)SGDProcessor p
= new SGDProcessor(c);
How to provide configuration to objects *Constructor/method parameters?DTO?Map<String, String>?
* for configuring services, use ConfigAdmin
NATIVE LIBRARIES
16
FRAGMENTS PROVIDE THE RIGHT NATIVE LIB FOR YOUR PLATFORM
Tensors are residing only in native (GPU) memory
Build a fragment with Bundle-NativeCode header for each supported platform
At runtime, the right fragment resolves and is attached to the host bundle providing the Java objects with native methods
Caveat: correct fragment for GPU still has to be selected manually (not automatically provided as capability)
PROMISES
18
DIANNE Neural network modules are executed asynchronouslyNeuralNetwork provides API with promises
final NeuralNetwork nn = ...;Tensor batch = loadBatch();Tensor nextBatch;while(learning){
// do forward-backward pass during trainingPromise result = nn.forward(batch,…).then( p → {
Tensor output = p.getValue().tensor; Tensor grad = calculateGradient(output);return nn.backward(grad);
}).then(…);
nextBatch = loadBatch(); // already load next batchresult.getValue(); // wait for async completion… // flip nextBatch and batch
}
CONCIERGE
19
A small footprint OSGi core implementation
All demos shown during this presentation were running on Concierge
Learn more tomorrow: “Getting to the Next Level with Eclipse Concierge” - Schubartsaal, 17h45
21
http://dianne.intec.ugent.be/
git clone https://github.com/ibcn-cloudlet/dianne.git
THANK YOU!