{"id":21263618,"url":"https://github.com/adamwespiser/deep-learning-koans","last_synced_at":"2025-07-21T04:06:34.416Z","repository":{"id":151146415,"uuid":"214577484","full_name":"adamwespiser/deep-learning-koans","owner":"adamwespiser","description":"A series of educational Deep Learning Koans, using Julia and Flux.jl","archived":false,"fork":false,"pushed_at":"2019-12-11T21:24:34.000Z","size":220,"stargazers_count":30,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T07:24:37.924Z","etag":null,"topics":["deep-learning","education","flux","ijulia","julia","koans","literate-programming","notebooks"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamwespiser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-12T04:28:22.000Z","updated_at":"2025-02-18T15:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7390a2c-a1e9-44de-ae72-3a26b4c99e4f","html_url":"https://github.com/adamwespiser/deep-learning-koans","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamwespiser/deep-learning-koans","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwespiser%2Fdeep-learning-koans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwespiser%2Fdeep-learning-koans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwespiser%2Fdeep-learning-koans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwespiser%2Fdeep-learning-koans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamwespiser","download_url":"https://codeload.github.com/adamwespiser/deep-learning-koans/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwespiser%2Fdeep-learning-koans/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266236690,"owners_count":23897229,"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","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","education","flux","ijulia","julia","koans","literate-programming","notebooks"],"created_at":"2024-11-21T05:00:34.201Z","updated_at":"2025-07-21T04:06:34.409Z","avatar_url":"https://github.com/adamwespiser.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep Learning Koans\nA collection of Deep Learning Koans written for Flux.jl and Julia Programming language.\n\n#### Colab Link\n[Run these koans on Colab](https://colab.research.google.com/github/adamwespiser/deep-learning-koans/blob/master)\n\n\n\n### What is a Koan?\nA Koan is a short puzzle designed to elucidate understanding upon completion. The plural, \"koans\" are also a format of interactive programming puzzles designed to be run locally and to teach the user programming, through a series of challenges in order of increasing difficultly. This is exactly what this project is!    \nThus, a koan critically consists of three components:     \n - A text introduction to a concept and problem\n - Section of code that applies the concept\n - A test that is not passed untill the concept is applied correctly\n\nThis format borrows a lot from the pedalogical approach of Daniel P. Friedman, and his book, [The Little Schemer](https://www.ccs.neu.edu/home/matthias/BTLS/).    \nA list of koans projects for a variety of platforms and languages [can be found here on github](https://github.com/ahmdrefat/awesome-koans/blob/master/koans-en.md).    \n\n\n### So what's this project trying to do?\nThis project attempts to take the Koans approach to teaching programming, and apply that to the subject matter of deep learning in Julia.  \nTo do this, we will focus first on giving a skippable overview of Julia, then move on to demonstrating the library [Flux.jl](https://github.com/FluxML/Flux.jl).  \nTechnically, this project is implemented as a series of IJulia Notebooks that you generate from source code, host locally with IJulia, the extension to run Julia in a Jupyter Notebook, then interactively modify the code until \"it works\". \nLinks and additional resources are scattered throughout the material.    \n\n### Why Julia?\nFirst, Julia offer a couple advantages compared to Python and R that make it superior for some projects, namely, its gradual typing improves the developer experience and code reliability, and compilation to LLVM makes Julia code faster than R/Matlab/Python. \nHowever, Julia is young, and does not have the depth and breadth of machine learning, and web development packages that make Python a safe production choice, or the depth of statistical packages and academic work that makes R so revered.     \nNonetheless, Julia's LLVM compilcation offers huge advantage for Deep Learning in research and practice: we can actually program using a single language, instead of having to call an underlying C++ library, like Tensorflow or PyTorch. This requires a programming language, differential programming, which is currently being studied and integrated into Julia through the Zygote project\n\n### Why Flux?\nFlux is a Julia only, neural network library, with basic differential programing capability, with a library of optimizers, layers, and helper functions that can facilitate deep learning, and has first-class support for GPU allocation.\nThus, solutions like Julia/Flux, that use a single language to compile to fast LLVM bytecode and leverage GPUs, are a good future for for Deep Learning, as they are conceptually simpler to understand than current solutions like PyTorch/TensorFlow with the same performance. However, and you'll see this very soon throgh the koans, the API maturity is not quite there! \n\n\n# Chapters/Contents\nThe chapter outline is as follows:\n - 1: [Introduction to Julia](notebooks/t001_introduction.ipynb)\n - 2: [Working With Data In Julia](notebooks/t002_data_ingestion.ipynb)\n - 3: [Intro to Flux](notebooks/t003_flux_intro.ipynb)\n - 4: [Convolutional Neural Networks and Layers in Flux](notebooks/t004_conv_layers.ipynb)\n - 5: [Recurrent Neural Networks and Layers in Flux](notebooks/t005_recurrent_layers)\n - 6: [Flux optimization](notebooks/t006_optimization.ipynb)\n - 7: [Putting in all together, and more examples!](notebooks/t007_conclusion.ipynb)\n\n#### Attribution Note\nMany examples of these koans are borrowed and modified from sources in the Flux source code, or examples in the Flux Documentation. \nThe Flux source code can be found here: [Flux.jl](https://github.com/FluxML/Flux.jl).\n\n\n# How to Run\nTo run this project, you will need Julia installed locally, [which is available here](https://julialang.org/downloads/index.html).  Additionally, you will need NVIDIA drivers installed on your machine, for the GPU based examples in Chapter 7.    \nClone the Repository, or download directly from Github.    \n```\ngit clone  https://github.com/adamwespiser/deep-learning-koans.git\n```\n\nRun julia in the `deep-learning-koans` directory    \n```\n$ cd deep-learning-koans/\n$ julia --project='.'\n```\n\nInstantiate the environment, which will download all the needed packages    \n```\njulia\u003e using Pkg; Pkg.instantiate();\n```\n\nBuild the notebooks    \n```\njulia\u003e include(\"deps/build.jl\")\n```\n\nOpen the Julia Notebooks    \n```\njulia\u003e using IJulia\njulia\u003e notebook(dir=\".\")    \n```\n\n# Dev\nThe projects is built using the script found in [`deps/build.jl`](deps/build.jl). \n\n#### Adding a package to Project.toml, Manifest.toml\nFor pkg X, we can get the UUID with the following:    \n```\njulia\u003e Pkg.METADATA_compatible_uuid(\"X\")    \n```\nThen, add an entry to `[deps]` in Project.toml.    \nFinally, we will want to re-populate the Manifest.toml, which we can do as followings:    \n```\n$ julia --project=\".\"    \njulia\u003e Pkg.resolve()    \njulia\u003e Pkg.instantiate()    \n```\n\n#### Test\nRun all the notebooks at once.    \n```\n$ julia --project=\".\" test/run_koan_source.jl\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamwespiser%2Fdeep-learning-koans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamwespiser%2Fdeep-learning-koans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamwespiser%2Fdeep-learning-koans/lists"}