Computational Laboratory for Energy And Nanoscience

University Homepage | Department of Physics
University Homepage | Department of Electrical and Computer Engineering
Map it | City of Ottawa | Regional News | Local Weather | Government of Canada


Hands on intro to deep learning and AI

I am often asked which online resources are good as a introduction to deep learning and AI for students and researchers who are interested in playing and learning. Here is what I typically recommend:

  1. Get comfortable using python
  2. Use Jupyter notebooks to write code and make plots with Google has a free cloud service where you can experiment.
  3. Work through the initial tutorials in pytorch. Pytorch is a programming framework which is used to construct and optimize deep neural networks. They are quite good. Start here. Tensorflow is another excellent option. I just have found pytorch a bit easier to use and understand, but that's just me. Given how much online documentation and tutorials there are written in tensorflow, if you're going do a lot of this kind of work, you'll have to become comfortable at least reading tensorflow code as well.
  4. Beyond the prebaked examples, I would also highly encourage new learners to generate a labelled dataset of you own (which could just be the value of a function), import it to pytorch, and train the model to predict the value. Once you have gotten this to work, try to see how nets handle extrapolation, interpolation, and the addition of noise in the training data. See how things behave as you increase the magnitude of the noise. You can also explore the difference between depth and width. For a fixed number of weights (i.e. parameters), are you better of using a shallow, wide net or a deep net with less neurons per layer. You should try different functions to get a fell for how things behave. For example, you could try sin(x), x^2, e^x, etc.
  5. You do some similar experiments with pictures by generating pictures of two circles at placed randomly at different distances. Can you figure out how to train a convolutional net to predict the distance between two particles? This was actually on of the test cases we did in a publication, so have a look here if you get stuck on this part:
  6. Try different types of topologies and work with your datasets. Try an RNN or transformer to predict the next value of a function. Try a GAN to make similar images to the circles.

Classical Mechanics (2nd year undergraduate course)

Introduction to Newtonian Dynamics with differential equations, conservation laws, numerical (computer) solutions

Thermodynamics (2nd year undergraduate course)

Basic concepts of thermodynamics; The Laws; properties and behaviour of pure substances; ideal gases and mixtures; equation of state; Maxwell's relations; heat transfer. COURSE NOTES (PDF)

Materials Science (3rd year undergraduate course), Cross listed Physics / Chemistry

Condensed Matter Physics (4th year undergraduate course)

As part of this course, students spend time surveying the recent scientific literature to identify publications which they would like to explore further. This involves conducting an interview with one of the authors and producing a summary aimed at non-specialist. See the links below:

A trip to space

In the Spring of 2015, we did a crazy thing - we decided to go to space! Then we found out space is cold, and batteries don't like the cold. we went back. Data from the flight will be used in Classical Mechanics, and Physics I.


Raspberry Pi

The Raspberry Pi is an amazing computing platform to do Physics with. Here is how we are incorporating it into the UOIT curriculum:

  • 3rd year experimental lab (check out my github repository: and our website)
  • Single particle dynamics in Classical Mechanics I (free fall, air friction, double well potentials)
  • Counting statistics in Thermodynamics (the origin of the 2nd Law)
  • Visualizing crystal structures
  • Phonos in crystals

All of this is done with a bit of python and very basic knowledge of electronics. Looking for more project ideas? Here's my idea list

During the 2015-2016, I am participating in a joint project with the UOIT Faculty of Education to develop course material and training for student teachers.

Graduate seminar (Computational Methods in Material Science)

  1. Slides
  2. putty.exe (ssh works too for linux/os x)
  3. IP:, login: student
  4. I will give you a number.
  5. cd student99
  6. ls
  7. Two directories should be visible: Input Ref
  8. cd Input
  9. ls
  10. cd Work
  11. Follow tutorial from 1.1b, below where it says "cd Work". The first thing you should read is "You will do most of the actions of this tutorial in this working directory...". Type the commands carefully. It matters whether they are upper or lower case. You can copy and paste them into the terminal. If you make a mistake, use the arrow keys (up) so you don't have to type everything out from the start. For a text editor, try nano. You can edit a file by typing (without quotation marks) "nano tbase1_x.files"
  12. To finish editing, use CRTL X. To search for a word, use CRTL W
  13. abinit tutorial #1
  14. If you get lost, type cd and this will return you to the original directory you started with.
  15. The command pwd will show you your current directory
  16. If you type cd .., this will bring you up one directory
  17. To delete files, use rm filename

Useful resources

UOIT uOttawa uWaterloo UOIT