Skip to content
Snippets Groups Projects
Chapter10.md 1.36 KiB
Newer Older
  • Learn to ignore specific revisions
  • abda's avatar
    abda committed
    # Material for Chapter 10
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    The notebook the exercise in Chapter 10 is available from here:
    [Notebook for mini U-net](https://github.com/vedranaa/teaching-notebooks/blob/main/02506_week10_MiniUnet.ipynb)
    
    You can aslo open it directly in Google Colab from here:
    
    abda's avatar
    abda committed
    [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vedranaa/teaching-notebooks/blob/main/02506_week10_MiniUnet.ipynb)
    
    abda's avatar
    abda committed
    
    
    ## Run the notebook on DTU Gbar
    
    
    abda's avatar
    abda committed
    You can also run the notebook on Gbar on an interactive note. This is done by setting up a Python environment. First you should log onto an interactive GPU node such as `voltash` by running the following command on the command line:
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    `voltash -X`
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    To set up a Python environment, you can use the script `env02506.sh`. You should place the file `env02506.sh` in a folder on the Gbar and then run the command line:
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    `source env02506.sh`
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    The first time you run this, the script will create a new python environment called `env02506` and activate it.
    
    abda's avatar
    abda committed
    
    Then you should install the packages needed which include:
    
    abda's avatar
    abda committed
    `pip install torch torchvision`
    `pip install Pillow`
    `pip install notebook`
    
    abda's avatar
    abda committed
    
    
    abda's avatar
    abda committed
    Now you are good to go. You can navigate to the folder that you wish to store the code, download the notebook from the link above, and open a jupyter notebook by typing the following in the command line:
    `jupyter-notebook`