Skip to content

Commit

Permalink
coding...
Browse files Browse the repository at this point in the history
  • Loading branch information
jzstark committed Jun 28, 2024
1 parent 2a280da commit cc6c800
Show file tree
Hide file tree
Showing 22 changed files with 10 additions and 31 deletions.
18 changes: 9 additions & 9 deletions examples/custom_algodiff_op.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ let custom_cos =
: Siso)

let _ =
let input = Mat.uniform 1 2 in
let input = _f 1. in (* Mat.uniform 1 2 in *)
(* [f] must be [f : vector -> scalar]. *)
let g' = grad custom_cos in
let h' = grad g' in
let g = grad Maths.cos in
let h = grad g in
Mat.print (g' input);
Mat.print (g input);
Mat.print (h' input);
Mat.print (h input);
let g' = diff custom_cos in
let h' = diff g' in
let g = diff Maths.cos in
let h = diff g in
print_float (g' input |> unpack_flt); print_endline "\n";
print_float (g input |> unpack_flt); print_endline "\n";
print_float (h' input |> unpack_flt); print_endline "\n";
print_float (h input |> unpack_flt); print_endline "\n"
1 change: 0 additions & 1 deletion examples/feedforward.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(*
* OWL - OCaml Scientific Computing
* Copyright (c) 2016-2022 Liang Wang <liang@ocaml.xyz>
Expand Down
1 change: 0 additions & 1 deletion examples/gradient_descent.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates how to write a gradient descent algorithm. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/inception_v3.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates how to use Owl to implement Google's Inception V3 (https://arxiv.org/abs/1512.00567).
Note that only the network structure of Inception is defined.
Expand Down
2 changes: 0 additions & 2 deletions examples/kmeans.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env owl

open Owl
module LL = Owl_cluster

Expand Down
1 change: 0 additions & 1 deletion examples/lazy_cifar10.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates using lazy functor to train a model on mnist. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/lazy_eval.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates the use of lazy evaluation in Owl *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/lazy_lstm.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates using lazy functor to train a LSTM network. *)

#zoo "217ef87bc36845c4e78e398d52bc4c5b"
Expand Down
1 change: 0 additions & 1 deletion examples/lazy_mnist.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates using lazy functor to train a model on mnist. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/linear_algebra.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example shows how to use linear algebra module in Owl. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/lstm.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* Text Generation using LSTM.
The book used is Alice’s Adventures in Wonderland by Lewis Carroll.
*)
Expand Down
1 change: 0 additions & 1 deletion examples/mnist_cnn.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example trains a simple convolutional network on the MNIST dataset. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/mnist_lenet.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example implements LeNet-5 architecture on the MNIST dataset. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/newton_method.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates how to implement Newton method with Algdoff. *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/regression.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
#require "owl-plplot"
(* Test Regression module *)

Expand Down
1 change: 0 additions & 1 deletion examples/squeezenet.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates how to use Owl to implement SqueezeNet (https://arxiv.org/abs/1602.07360).
Note that only the network structure of SqueezeNet is defined.
Expand Down
1 change: 0 additions & 1 deletion examples/svm.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
#require "owl-plplot"
(* This example demonstrates SVM regression. *)

Expand Down
1 change: 0 additions & 1 deletion examples/test_lda.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* Test Topic Module *)

(*
Expand Down
1 change: 0 additions & 1 deletion examples/test_log.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* stochastic gradient decent algorithm *)

module MX = Owl.Dense.Matrix.D
Expand Down
1 change: 0 additions & 1 deletion examples/tfidf.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* test TF-IDF model *)

open Owl
Expand Down
1 change: 0 additions & 1 deletion examples/vgg16.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env owl
(* This example demonstrates how to use Owl to implement VGG16 (https://arxiv.org/abs/1409.1556).
Note that only the network structure of VGG16 is defined.
Expand Down
2 changes: 1 addition & 1 deletion src/owl/misc/owl_dataset.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

open Owl_types

let remote_data_path () = "https://github.com/ryanrhymes/owl_dataset/raw/master/"
let remote_data_path () = "https://github.com/owlbarn/owl_dataset/raw/master/"

let local_data_path () : string =
let home = Sys.getenv "HOME" ^ "/.owl" in
Expand Down

0 comments on commit cc6c800

Please sign in to comment.