{"id":21195553,"url":"https://github.com/slamko/ocadl","last_synced_at":"2025-10-16T06:54:48.341Z","repository":{"id":181722359,"uuid":"666891323","full_name":"slamko/ocadl","owner":"slamko","description":"Blazingly type safe GPU accelerated Multi-Layer Perceptron","archived":false,"fork":false,"pushed_at":"2023-09-16T21:20:36.000Z","size":9548,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-17T14:59:04.631Z","etag":null,"topics":["deep-learning","dependent-types","functional-programming","gadt","neural-network","ocaml","type-safe"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slamko.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-15T23:52:39.000Z","updated_at":"2025-02-11T20:31:40.000Z","dependencies_parsed_at":"2023-10-11T08:59:48.984Z","dependency_job_id":null,"html_url":"https://github.com/slamko/ocadl","commit_stats":{"total_commits":174,"total_committers":1,"mean_commits":174.0,"dds":0.0,"last_synced_commit":"1fea17ebb56d6ad057bcbca95abb4b70cb561a99"},"previous_names":["slamko/ocadl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slamko/ocadl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slamko%2Focadl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slamko%2Focadl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slamko%2Focadl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slamko%2Focadl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slamko","download_url":"https://codeload.github.com/slamko/ocadl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slamko%2Focadl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279163936,"owners_count":26117566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","dependent-types","functional-programming","gadt","neural-network","ocaml","type-safe"],"created_at":"2024-11-20T19:28:48.001Z","updated_at":"2025-10-16T06:54:48.295Z","avatar_url":"https://github.com/slamko.png","language":"OCaml","readme":"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"\u003e\n\u003chead\u003e\n\u003c!-- 2023-08-06 Sun 15:01 --\u003e\n\u003cmeta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /\u003e\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n\u003ctitle\u003e\u0026lrm;\u003c/title\u003e\n\u003cmeta name=\"generator\" content=\"Org Mode\" /\u003e\n\u003cstyle\u003e\n  #content { max-width: 60em; margin: auto; }\n  .title  { text-align: center;\n             margin-bottom: .2em; }\n  .subtitle { text-align: center;\n              font-size: medium;\n              font-weight: bold;\n              margin-top:0; }\n  .todo   { font-family: monospace; color: red; }\n  .done   { font-family: monospace; color: green; }\n  .priority { font-family: monospace; color: orange; }\n  .tag    { background-color: #eee; font-family: monospace;\n            padding: 2px; font-size: 80%; font-weight: normal; }\n  .timestamp { color: #bebebe; }\n  .timestamp-kwd { color: #5f9ea0; }\n  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }\n  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }\n  .org-center { margin-left: auto; margin-right: auto; text-align: center; }\n  .underline { text-decoration: underline; }\n  #postamble p, #preamble p { font-size: 90%; margin: .2em; }\n  p.verse { margin-left: 3%; }\n  pre {\n    border: 1px solid #e6e6e6;\n    border-radius: 3px;\n    background-color: #f2f2f2;\n    padding: 8pt;\n    font-family: monospace;\n    overflow: auto;\n    margin: 1.2em;\n  }\n  pre.src {\n    position: relative;\n    overflow: auto;\n  }\n  pre.src:before {\n    display: none;\n    position: absolute;\n    top: -8px;\n    right: 12px;\n    padding: 3px;\n    color: #555;\n    background-color: #f2f2f299;\n  }\n  pre.src:hover:before { display: inline; margin-top: 14px;}\n  /* Languages per Org manual */\n  pre.src-asymptote:before { content: 'Asymptote'; }\n  pre.src-awk:before { content: 'Awk'; }\n  pre.src-authinfo::before { content: 'Authinfo'; }\n  pre.src-C:before { content: 'C'; }\n  /* pre.src-C++ doesn't work in CSS */\n  pre.src-clojure:before { content: 'Clojure'; }\n  pre.src-css:before { content: 'CSS'; }\n  pre.src-D:before { content: 'D'; }\n  pre.src-ditaa:before { content: 'ditaa'; }\n  pre.src-dot:before { content: 'Graphviz'; }\n  pre.src-calc:before { content: 'Emacs Calc'; }\n  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }\n  pre.src-fortran:before { content: 'Fortran'; }\n  pre.src-gnuplot:before { content: 'gnuplot'; }\n  pre.src-haskell:before { content: 'Haskell'; }\n  pre.src-hledger:before { content: 'hledger'; }\n  pre.src-java:before { content: 'Java'; }\n  pre.src-js:before { content: 'Javascript'; }\n  pre.src-latex:before { content: 'LaTeX'; }\n  pre.src-ledger:before { content: 'Ledger'; }\n  pre.src-lisp:before { content: 'Lisp'; }\n  pre.src-lilypond:before { content: 'Lilypond'; }\n  pre.src-lua:before { content: 'Lua'; }\n  pre.src-matlab:before { content: 'MATLAB'; }\n  pre.src-mscgen:before { content: 'Mscgen'; }\n  pre.src-ocaml:before { content: 'Objective Caml'; }\n  pre.src-octave:before { content: 'Octave'; }\n  pre.src-org:before { content: 'Org mode'; }\n  pre.src-oz:before { content: 'OZ'; }\n  pre.src-plantuml:before { content: 'Plantuml'; }\n  pre.src-processing:before { content: 'Processing.js'; }\n  pre.src-python:before { content: 'Python'; }\n  pre.src-R:before { content: 'R'; }\n  pre.src-ruby:before { content: 'Ruby'; }\n  pre.src-sass:before { content: 'Sass'; }\n  pre.src-scheme:before { content: 'Scheme'; }\n  pre.src-screen:before { content: 'Gnu Screen'; }\n  pre.src-sed:before { content: 'Sed'; }\n  pre.src-sh:before { content: 'shell'; }\n  pre.src-sql:before { content: 'SQL'; }\n  pre.src-sqlite:before { content: 'SQLite'; }\n  /* additional languages in org.el's org-babel-load-languages alist */\n  pre.src-forth:before { content: 'Forth'; }\n  pre.src-io:before { content: 'IO'; }\n  pre.src-J:before { content: 'J'; }\n  pre.src-makefile:before { content: 'Makefile'; }\n  pre.src-maxima:before { content: 'Maxima'; }\n  pre.src-perl:before { content: 'Perl'; }\n  pre.src-picolisp:before { content: 'Pico Lisp'; }\n  pre.src-scala:before { content: 'Scala'; }\n  pre.src-shell:before { content: 'Shell Script'; }\n  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }\n  /* additional language identifiers per \"defun org-babel-execute\"\n       in ob-*.el */\n  pre.src-cpp:before  { content: 'C++'; }\n  pre.src-abc:before  { content: 'ABC'; }\n  pre.src-coq:before  { content: 'Coq'; }\n  pre.src-groovy:before  { content: 'Groovy'; }\n  /* additional language identifiers from org-babel-shell-names in\n     ob-shell.el: ob-shell is the only babel language using a lambda to put\n     the execution function name together. */\n  pre.src-bash:before  { content: 'bash'; }\n  pre.src-csh:before  { content: 'csh'; }\n  pre.src-ash:before  { content: 'ash'; }\n  pre.src-dash:before  { content: 'dash'; }\n  pre.src-ksh:before  { content: 'ksh'; }\n  pre.src-mksh:before  { content: 'mksh'; }\n  pre.src-posh:before  { content: 'posh'; }\n  /* Additional Emacs modes also supported by the LaTeX listings package */\n  pre.src-ada:before { content: 'Ada'; }\n  pre.src-asm:before { content: 'Assembler'; }\n  pre.src-caml:before { content: 'Caml'; }\n  pre.src-delphi:before { content: 'Delphi'; }\n  pre.src-html:before { content: 'HTML'; }\n  pre.src-idl:before { content: 'IDL'; }\n  pre.src-mercury:before { content: 'Mercury'; }\n  pre.src-metapost:before { content: 'MetaPost'; }\n  pre.src-modula-2:before { content: 'Modula-2'; }\n  pre.src-pascal:before { content: 'Pascal'; }\n  pre.src-ps:before { content: 'PostScript'; }\n  pre.src-prolog:before { content: 'Prolog'; }\n  pre.src-simula:before { content: 'Simula'; }\n  pre.src-tcl:before { content: 'tcl'; }\n  pre.src-tex:before { content: 'TeX'; }\n  pre.src-plain-tex:before { content: 'Plain TeX'; }\n  pre.src-verilog:before { content: 'Verilog'; }\n  pre.src-vhdl:before { content: 'VHDL'; }\n  pre.src-xml:before { content: 'XML'; }\n  pre.src-nxml:before { content: 'XML'; }\n  /* add a generic configuration mode; LaTeX export needs an additional\n     (add-to-list 'org-latex-listings-langs '(conf \" \")) in .emacs */\n  pre.src-conf:before { content: 'Configuration File'; }\n\n  table { border-collapse:collapse; }\n  caption.t-above { caption-side: top; }\n  caption.t-bottom { caption-side: bottom; }\n  td, th { vertical-align:top;  }\n  th.org-right  { text-align: center;  }\n  th.org-left   { text-align: center;   }\n  th.org-center { text-align: center; }\n  td.org-right  { text-align: right;  }\n  td.org-left   { text-align: left;   }\n  td.org-center { text-align: center; }\n  dt { font-weight: bold; }\n  .footpara { display: inline; }\n  .footdef  { margin-bottom: 1em; }\n  .figure { padding: 1em; }\n  .figure p { text-align: center; }\n  .equation-container {\n    display: table;\n    text-align: center;\n    width: 100%;\n  }\n  .equation {\n    vertical-align: middle;\n  }\n  .equation-label {\n    display: table-cell;\n    text-align: right;\n    vertical-align: middle;\n  }\n  .inlinetask {\n    padding: 10px;\n    border: 2px solid gray;\n    margin: 10px;\n    background: #ffffcc;\n  }\n  #org-div-home-and-up\n   { text-align: right; font-size: 70%; white-space: nowrap; }\n  textarea { overflow-x: auto; }\n  .linenr { font-size: smaller }\n  .code-highlighted { background-color: #ffff00; }\n  .org-info-js_info-navigation { border-style: none; }\n  #org-info-js_console-label\n    { font-size: 10px; font-weight: bold; white-space: nowrap; }\n  .org-info-js_search-highlight\n    { background-color: #ffff00; color: #000000; font-weight: bold; }\n  .org-svg { }\n\u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cdiv id=\"content\" class=\"content\"\u003e\n\u003cdiv id=\"table-of-contents\" role=\"doc-toc\"\u003e\n\u003ch2\u003eTable of Contents\u003c/h2\u003e\n\u003cdiv id=\"text-table-of-contents\" role=\"doc-toc\"\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#orgce665f2\"\u003e1. Type safe deepl learning framework for OCaml written from scratch\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#org4cd81a5\"\u003e1.1. Currently supporting\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#org40f2217\"\u003e1.2. The main idea behind\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"outline-container-orgce665f2\" class=\"outline-2\"\u003e\n\u003ch2 id=\"orgce665f2\"\u003e\u003cspan class=\"section-number-2\"\u003e1.\u003c/span\u003e Type safe deepl learning framework for OCaml written from scratch\u003c/h2\u003e\n\u003cdiv class=\"outline-text-2\" id=\"text-1\"\u003e\n\u003c/div\u003e\n\u003cdiv id=\"outline-container-org4cd81a5\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org4cd81a5\"\u003e\u003cspan class=\"section-number-3\"\u003e1.1.\u003c/span\u003e Currently supporting\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-1-1\"\u003e\n\u003cul class=\"org-ul\"\u003e\n\u003cli\u003eFully connected\u003c/li\u003e\n\u003cli\u003eConvolutional 3D\u003c/li\u003e\n\u003cli\u003ePooling 3D\u003c/li\u003e\n\u003cli\u003eFlatten 3D\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\nlayers\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cdiv id=\"outline-container-org40f2217\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org40f2217\"\u003e\u003cspan class=\"section-number-3\"\u003e1.2.\u003c/span\u003e The main idea behind\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-1-2\"\u003e\n\u003cp\u003e\nis to check the Neural Network architecture at compile time,\nmaking code like:\n\u003c/p\u003e\n\u003cdiv class=\"org-src-container\"\u003e\n\u003cpre class=\"src src-ocaml\"\u003e   make_input3 [| 28; 28; 1|]\n   |\u0026gt; make_conv3d (* some params*)\n   |\u0026gt; make_fully_connected (* fully connected layer after the convolutional 3D one does not make any sense *)\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nabsolutely impossible.\nThis is something that makes the hole codebase much safer and something\nthat is not done by Owl deep learning library.\n\u003c/p\u003e\n\n\u003cp\u003e\nInitially I was using Lapack linear algebra bindings for OCaml\nbut it makes the operations like matrix reshape or flatten\nextremely complicated and expensive so the matrix library for this framework\nis also written from scratch.\n\u003c/p\u003e\n\n\u003cp\u003e\nThis repo is an experimental project and a work in progress so sometimes it doesn't even compile\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"postamble\" class=\"status\"\u003e\n\u003cp class=\"date\"\u003eCreated: 2023-08-06 Sun 15:01\u003c/p\u003e\n\u003cp class=\"validation\"\u003e\u003ca href=\"https://validator.w3.org/check?uri=referer\"\u003eValidate\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslamko%2Focadl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslamko%2Focadl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslamko%2Focadl/lists"}