0% found this document useful (0 votes)
2 views

2024_GR5245 class1 Python review

The document outlines the syllabus for the GR5245 Fall 2024 course 'Python for Deep Learning' taught by Ka Yi Ng, covering essential Python concepts such as built-in data types, data structures, iterations, and defining functions. It also introduces important libraries like Numpy, Scipy, and others for numerical calculations and data manipulation. Additionally, it mentions the use of Google Colab for practical applications.

Uploaded by

yl5404
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

2024_GR5245 class1 Python review

The document outlines the syllabus for the GR5245 Fall 2024 course 'Python for Deep Learning' taught by Ka Yi Ng, covering essential Python concepts such as built-in data types, data structures, iterations, and defining functions. It also introduces important libraries like Numpy, Scipy, and others for numerical calculations and data manipulation. Additionally, it mentions the use of Google Colab for practical applications.

Uploaded by

yl5404
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

GR5245 Fall 2024

Python for Deep Learning


Instructor: Ka Yi Ng

Python Review
Built-in data types
• Basic data types: int, float, string, bool, complex
• Dynamically typed

• Operators
Built-in data structures
• List: mutable
• Tuple: immutable
• Dictionary: key-value pairs
Slice operator
Iterations
• Iteration • Iterable:
• an object that returns its members one at a time
• used in a for statement
• examples: range, list, tuple, strings, dictionary

• Syntax
List comprehension
• Convenient and compact ways of defining new lists
Defining functions
• Multiple outputs

• Default parameter value


Simultaneous assignment
Packages and modules
• Module: python file (*.py)
• Package of modules, package of packages and modules
• Standard python packages: random, time, datetime, sys
• Ways of importing package, module or functions

• Numpy, scipy, pandas, matplotlib, seaborn, scikit-learn, pytorch,


tensorflow, …
Numpy
• Numerical calculations on n-dim arrays
• Main data structure: ndarray
• All elements of same datatype
• Slicing applies
• Memory allocated upfront, fixed size
Numpy
• Slicing

• Vectorization • Broadcasting
Google Colab

You might also like