To achieve speedier execution, optimizing the computation graph of DNN models is very important. Execution of DNN consists of two phases, the training phase and the inference phase. The training phase updates the parameters with a back propagation technique. The inference phase makes predictions (forward-propagation only) for the actual task. If the framework focuses on only the inference phase, it can optimize the computation graph more aggressively.
WebDNN focuses on only the inference phase execution on end user devices and supports aggressive optimization. This optimization pipeline can be applied for models trained with various DNN frameworks. It is not required to edit the training codes.
|10 - 11WebAssembly/asm.js||- 15WebAssembly/asm.js||Technology PreviewWebGPU||- 58WebAssembly/asm.js||- 53WebAssembly/asm.js|
In Safari Technology Preview, WebGPU API is disabled as default. To enable the API, see "Develop" > "Experimental Features" > "WebGPU" in menu bar.
We measured execution time for VGG16  , Inception-v3  , and ResNet50 . Below figure shows the result compared with Keras.js. Computation time per image is shown in vertical axis as logarithmic scale. All tests were run on Mac Book Pro early 2015, Intel Core i5 2.7 GHz CPU, 16 GB Memory, and Intel Iris Graphics 6100 GPU. The web browser is Safari Technology Preview 30.
This example runs Neural Style Transfer model . Neural Style Transfer model are given 2 input images, one is content image and another is style image. Then this model generate an image based on the style of the style image and the content in the content image.
We use chainer  implementation provided in  and pre-trained model provided in . The pre-trained model are transpiled by GraphTranspiler into graph descriptor, and then executed by DescriptorRunner. All computation are done by web browser, not by server.