Owl Demo @ ReasonML 2019
The Zoo gist contains a bunch of CSV files to demonstrate the dataframe module.
VGG16 is one of the DNN models for image classification. The original paper of this network is: Very Deep Convolutional Networks for Large-Scale Image Recognition.
This gist implements an VGG16 service in Owl, and provides simple interfaces to use. Here is an example:
#zoo "f5409c44d6444921a8ceec00e33c42c4"
Squeezenet is one of the recent models to do image recognition, with focus on model size reduction. It can achieve AlexNet-level accuracy on ImageNet with 50x fewer parameters. The original paper of this network is here.
This gist implements an Squeezenet service in Owl, and provides simple interfaces to use. Here is an example:
#zoo "c424e1d1454d58cfb9b0284ba1925a48"
#!/usr/bin/env owl | |
open Owl | |
open Owl_types | |
open Algodiff.S | |
open Neural | |
open Neural.S | |
open Neural.S.Graph |
Neural Style Transfer is the process of using Deep Neural Networks to migrate the semantic content of one image to different styles.
This gist implements NST in Owl, and provides a simple interfaces to use. Here is an example:
#zoo "6f28d54e69d1a19c1819f52c5b16c1a1"
(* find the root inputs of [x] *) | |
let find_roots x = | |
let s = Owl_utils.Stack.make () in | |
let rec _find x = | |
Array.iter (fun n -> | |
if n.op = Noop then Owl_utils.Stack.push s n | |
else _find n | |
) x.prev | |
in | |
_find x; |
module M = Owl_lazy.Make (Arr);; | |
let x = Arr.uniform [|8;8|];; | |
let a = M.of_ndarray x;; | |
let b = M.(a |> sin |> cos);; | |
M._eval_term b;; | |
module M = Owl_lazy.Make (Arr);; | |
let x = Arr.uniform [|8;8|];; | |
let y = Arr.uniform [|8;8|];; |
#require "owl_opencl";; | |
open Owl_opencl_operand;; | |
let x = Arr (Dense.Ndarray.S.uniform [|10;10|]);; | |
let y = Owl_opencl_dense.add_scalar x (F 1.);; | |
let z = Owl_opencl_dense.cos y;; | |
eval z;; | |
#require "owl_opencl";; | |
open Owl_opencl_operand;; |
#require "owl_opencl";; | |
let x0 = Dense.Ndarray.S.uniform [|5;5|];; | |
let x1 = Dense.Ndarray.S.uniform [|5;5|];; | |
let x2 = Dense.Ndarray.S.uniform [|5;5|];; | |
let x3 = Owl_opencl_dense.(add (Arr x0) (Arr x1));; | |
let x4 = Owl_opencl_dense.(add x3 (Arr x2));; | |
Owl_opencl_dense.eval x4;; |