{"id":14958718,"url":"https://github.com/hvass-labs/tensorflow-tutorials","last_synced_at":"2025-05-14T05:12:16.492Z","repository":{"id":39787991,"uuid":"61993351","full_name":"Hvass-Labs/TensorFlow-Tutorials","owner":"Hvass-Labs","description":"TensorFlow Tutorials with YouTube Videos","archived":false,"fork":false,"pushed_at":"2021-01-15T20:20:02.000Z","size":67974,"stargazers_count":9277,"open_issues_count":1,"forks_count":4172,"subscribers_count":541,"default_branch":"master","last_synced_at":"2025-04-11T00:46:59.957Z","etag":null,"topics":["deep-learning","machine-learning","neural-network","python-notebook","reinforcement-learning","tensorflow","tutorial","youtube"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Hvass-Labs.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2016-06-26T14:43:21.000Z","updated_at":"2025-04-10T11:45:35.000Z","dependencies_parsed_at":"2022-07-09T18:46:41.567Z","dependency_job_id":null,"html_url":"https://github.com/Hvass-Labs/TensorFlow-Tutorials","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hvass-Labs%2FTensorFlow-Tutorials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hvass-Labs%2FTensorFlow-Tutorials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hvass-Labs%2FTensorFlow-Tutorials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hvass-Labs%2FTensorFlow-Tutorials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hvass-Labs","download_url":"https://codeload.github.com/Hvass-Labs/TensorFlow-Tutorials/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"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","machine-learning","neural-network","python-notebook","reinforcement-learning","tensorflow","tutorial","youtube"],"created_at":"2024-09-24T13:18:07.912Z","updated_at":"2025-05-14T05:12:11.477Z","avatar_url":"https://github.com/Hvass-Labs.png","language":"Jupyter Notebook","readme":"# TensorFlow Tutorials\n\n[Original repository on GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials)\n\nOriginal author is [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org)\n\n## Introduction\n\n* These tutorials are intended for beginners in Deep Learning and TensorFlow.\n* Each tutorial covers a single topic.\n* The source-code is well-documented.\n* There is a [YouTube video](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ) for each tutorial.\n\n## Tutorials for TensorFlow 2\n\nThe following tutorials have been updated and work with **TensorFlow 2**\n(some of them run in \"v.1 compatibility mode\").\n\n1. Simple Linear Model\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb))\n\n2. Convolutional Neural Network\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb))\n\n3-C. Keras API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03C_Keras_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03C_Keras_API.ipynb))\n\n10. Fine-Tuning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/10_Fine-Tuning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/10_Fine-Tuning.ipynb))\n\n13-B. Visual Analysis for MNIST\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13B_Visual_Analysis_MNIST.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/13B_Visual_Analysis_MNIST.ipynb))\n\n16. Reinforcement Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/16_Reinforcement_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/16_Reinforcement_Learning.ipynb))\n\n19. Hyper-Parameter Optimization\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/19_Hyper-Parameters.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/19_Hyper-Parameters.ipynb))\n\n20. Natural Language Processing\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/20_Natural_Language_Processing.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/20_Natural_Language_Processing.ipynb))\n\n21. Machine Translation\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb))\n\n22. Image Captioning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/22_Image_Captioning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/22_Image_Captioning.ipynb))\n\n23. Time-Series Prediction\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb))\n\n## Tutorials for TensorFlow 1\n\nThe following tutorials only work with the older **TensorFlow 1** API, so you\nwould need to install an older version of TensorFlow to run these. It would take\ntoo much time and effort to convert these tutorials to TensorFlow 2.\n\n3. Pretty Tensor\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03_PrettyTensor.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03_PrettyTensor.ipynb))\n\n3-B. Layers API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03B_Layers_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03B_Layers_API.ipynb))\n\n4. Save \u0026 Restore\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/04_Save_Restore.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/04_Save_Restore.ipynb))\n\n5. Ensemble Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/05_Ensemble_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/05_Ensemble_Learning.ipynb))\n\n6. CIFAR-10\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb))\n\n7. Inception Model\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb))\n\n8. Transfer Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb))\n\n9. Video Data\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/09_Video_Data.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/09_Video_Data.ipynb))\n\n11. Adversarial Examples\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/11_Adversarial_Examples.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/11_Adversarial_Examples.ipynb))\n\n12. Adversarial Noise for MNIST\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/12_Adversarial_Noise_MNIST.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/12_Adversarial_Noise_MNIST.ipynb))\n\n13. Visual Analysis\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13_Visual_Analysis.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/13_Visual_Analysis.ipynb))\n\n14. DeepDream\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/14_DeepDream.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/14_DeepDream.ipynb))\n\n15. Style Transfer\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/15_Style_Transfer.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/15_Style_Transfer.ipynb))\n\n17. Estimator API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/17_Estimator_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/17_Estimator_API.ipynb))\n\n18. TFRecords \u0026 Dataset API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/18_TFRecords_Dataset_API.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/18_TFRecords_Dataset_API.ipynb))\n\n## Videos\n\nThese tutorials are also available as [YouTube videos](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ).\n\n## Translations\n\nThese tutorials have been translated to the following languages:\n\n* [Chinese](https://github.com/Hvass-Labs/TensorFlow-Tutorials-Chinese)\n\n### New Translations\n\nYou can help by translating the remaining tutorials or reviewing the ones that have already been translated. You can also help by translating to other languages.\n\nIt is a very big job to translate all the tutorials, so you should just start with Tutorials #01, #02 and #03-C which are the most important for beginners.\n\n### New Videos\n\nYou are also very welcome to record your own YouTube videos in other languages. It is strongly recommended that you get a decent microphone because good sound quality is very important. I used `vokoscreen` for recording the videos and the free [DaVinci Resolve](https://www.blackmagicdesign.com/products/davinciresolve/) for editing the videos.\n\n## Forks\n\nSee the [selected list of forks](forks.md) for community modifications to these tutorials.\n\n## Installation\n\nThere are different ways of installing and running TensorFlow. This section describes how I did it\nfor these tutorials. You may want to do it differently and you can search the internet for instructions.\n\nIf you are new to using Python and Linux then this may be challenging\nto get working and you may need to do internet searches for error-messages, etc.\nIt will get easier with practice. You can also run the tutorials without installing\nanything by using Google Colab, see further below.\n\nSome of the Python Notebooks use source-code located in different files to allow for easy re-use\nacross multiple tutorials. It is therefore recommended that you download the whole repository\nfrom GitHub, instead of just downloading the individual Python Notebooks.\n\n### Git\n\nThe easiest way to download and install these tutorials is by using git from the command-line:\n\n    git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git\n\nThis will create the directory `TensorFlow-Tutorials` and download all the files to it.\n\nThis also makes it easy to update the tutorials, simply by executing this command inside that directory:\n\n    git pull\n\n### Download Zip-File\n\nYou can also [download](https://github.com/Hvass-Labs/TensorFlow-Tutorials/archive/master.zip)\nthe contents of the GitHub repository as a Zip-file and extract it manually.\n\n### Environment\n\nI use [Anaconda](https://www.continuum.io/downloads) because it comes with many Python\npackages already installed and it is easy to work with. After installing Anaconda,\nyou should create a [conda environment](http://conda.pydata.org/docs/using/envs.html)\nso you do not destroy your main installation in case you make a mistake somewhere:\n\n    conda create --name tf python=3\n\nWhen Python gets updated to a new version, it takes a while before TensorFlow also\nuses the new Python version. So if the TensorFlow installation fails, then you may\nhave to specify an older Python version for your new environment, such as: \n\n    conda create --name tf python=3.6\n\nNow you can switch to the new environment by running the following (on Linux):\n\n    source activate tf\n\n### Required Packages\n\nThe tutorials require several Python packages to be installed. The packages are listed in\n[requirements.txt](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/requirements.txt)\n\nTo install the required Python packages and dependencies you first have to activate the\nconda-environment as described above, and then you run the following command\nin a terminal:\n\n    pip install -r requirements.txt\n\nStarting with TensorFlow 2.1 it includes both the CPU and GPU versions and will\nautomatically switch if you have a GPU. But this requires the installation of various\nNVIDIA drivers, which is a bit complicated and is not described here.\n\n### Python Version 3.5 or Later\n\nThese tutorials were developed on Linux using **Python 3.5 / 3.6** (the [Anaconda](https://www.continuum.io/downloads) distribution) and [PyCharm](https://www.jetbrains.com/pycharm/).\n\nThere are reports that Python 2.7 gives error messages with these tutorials. Please make sure you are using **Python 3.5** or later!\n\n## How To Run\n\nIf you have followed the above installation instructions, you should\nnow be able to run the tutorials in the Python Notebooks:\n\n    cd ~/development/TensorFlow-Tutorials/  # Your installation directory.\n    jupyter notebook\n\nThis should start a web-browser that shows the list of tutorials. Click on a tutorial to load it.\n\n### Run in Google Colab\n\nIf you do not want to install anything on your own computer, then the Notebooks\ncan be viewed, edited and run entirely on the internet by using\n[Google Colab](https://colab.research.google.com). There is a\n[YouTube video](https://www.youtube.com/watch?v=Hs6HI2YWchM) explaining how to do this.\nYou click the \"Google Colab\"-link next to each tutorial listed above.\nYou can view the Notebook on Colab but in order to run it you need to login using\nyour Google account.\nThen you need to execute the following commands at the top of the Notebook,\nwhich clones the contents of this repository to your work-directory on Colab.\n\n    # Clone the repository from GitHub to Google Colab's temporary drive.\n    import os\n    work_dir = \"/content/TensorFlow-Tutorials/\"\n    if not os.path.exists(work_dir):\n        !git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git\n    os.chdir(work_dir)\n\nAll required packages should already be installed on Colab, otherwise you\ncan run the following command:\n\n    !pip install -r requirements.txt\n\n## Older Versions\n\nSometimes the source-code has changed from that shown in the YouTube videos. This may be due to\nbug-fixes, improvements, or because code-sections are moved to separate files for easy re-use.\n\nIf you want to see the exact versions of the source-code that were used in the YouTube videos,\nthen you can [browse the history](https://github.com/Hvass-Labs/TensorFlow-Tutorials/commits/master)\nof commits to the GitHub repository.\n\n## License (MIT)\n\nThese tutorials and source-code are published under the [MIT License](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/LICENSE)\nwhich allows very broad use for both academic and commercial purposes.\n\nA few of the images used for demonstration purposes may be under copyright. These images are included under the \"fair usage\" laws.\n\nYou are very welcome to modify these tutorials and use them in your own projects.\nPlease keep a link to the [original repository](https://github.com/Hvass-Labs/TensorFlow-Tutorials).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvass-labs%2Ftensorflow-tutorials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvass-labs%2Ftensorflow-tutorials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvass-labs%2Ftensorflow-tutorials/lists"}