{"cells": [{"cell_type": "markdown", "id": "842891b3", "metadata": {"papermill": {"duration": 0.020853, "end_time": "2024-09-01T11:54:52.578776", "exception": false, "start_time": "2024-09-01T11:54:52.557923", "status": "completed"}, "tags": []}, "source": ["\n", "# Tutorial 1: Introduction to PyTorch\n", "\n", "* **Author:** Phillip Lippe\n", "* **License:** CC BY-SA\n", "* **Generated:** 2024-09-01T11:54:45.449960\n", "\n", "This tutorial will give a short introduction to PyTorch basics, and get you setup for writing your own neural networks.\n", "This notebook is part of a lecture series on Deep Learning at the University of Amsterdam.\n", "The full list of tutorials can be found at https://uvadlc-notebooks.rtfd.io.\n", "\n", "\n", "---\n", "Open in [{height=\"20px\" width=\"117px\"}](https://colab.research.google.com/github/PytorchLightning/lightning-tutorials/blob/publication/.notebooks/course_UvA-DL/01-introduction-to-pytorch.ipynb)\n", "\n", "Give us a \u2b50 [on Github](https://www.github.com/Lightning-AI/lightning/)\n", "| Check out [the documentation](https://lightning.ai/docs/)\n", "| Join us [on Discord](https://discord.com/invite/tfXFetEZxv)"]}, {"cell_type": "markdown", "id": "19a68950", "metadata": {"papermill": {"duration": 0.017542, "end_time": "2024-09-01T11:54:52.614443", "exception": false, "start_time": "2024-09-01T11:54:52.596901", "status": "completed"}, "tags": []}, "source": ["## Setup\n", "This notebook requires some packages besides pytorch-lightning."]}, {"cell_type": "code", "execution_count": 1, "id": "13e4dba3", "metadata": {"colab": {}, "colab_type": "code", "execution": {"iopub.execute_input": "2024-09-01T11:54:52.643897Z", "iopub.status.busy": "2024-09-01T11:54:52.643704Z", "iopub.status.idle": "2024-09-01T11:54:53.916607Z", "shell.execute_reply": "2024-09-01T11:54:53.915411Z"}, "id": "LfrJLKPFyhsK", "lines_to_next_cell": 0, "papermill": {"duration": 1.288912, "end_time": "2024-09-01T11:54:53.918740", "exception": false, "start_time": "2024-09-01T11:54:52.629828", "status": "completed"}, "tags": []}, "outputs": [{"name": "stdout", "output_type": "stream", "text": ["\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.\u001b[0m\u001b[33m\r\n", "\u001b[0m"]}], "source": ["! pip install --quiet \"torch >=1.8.1,<2.5\" \"seaborn\" \"torchmetrics >=1.0,<1.5\" \"torchvision\" \"matplotlib\" \"numpy <3.0\" \"pytorch-lightning >=2.0,<2.5\""]}, {"cell_type": "markdown", "id": "dbd1c7a9", "metadata": {"papermill": {"duration": 0.027683, "end_time": "2024-09-01T11:54:53.970047", "exception": false, "start_time": "2024-09-01T11:54:53.942364", "status": "completed"}, "tags": []}, "source": ["