
Explore TensorFlow 2.0 for neural networks, from basic neurons to convolutional and recurrent models, and learn practical applications in stock prediction, generative adversarial networks, reinforcement learning, and natural language processing.
Outline of the course introduces tensor flow 2.0 and the caris API, plus Google Colab setup, covering linear models, CNNs, RNNs, time series forecasting, and applications.
Access the course code via the resources tab, using Code Link for notebooks and GitHub link for extra materials. Learn notebooks vs plain text Python files and common retrieval mistakes.
Explore Google Colab, a cloud notebook for writing Python deep learning code with free GPU or TPU access, preinstalled libraries, and easy sharing via Google Drive.
Learn to use TensorFlow 2.0 in Google Colab by installing beta 1, verifying the version, and restarting the runtime, while embracing the principle of learning the principles, not the syntax.
Learn to upload your own data to Google Colab using wget, tf get_file, and direct drive mounting; load with pandas, rename columns, and visualize with histograms and scatter matrices.
Learn the numpy stack in Python, including numpy, pandas, matplotlib, scipy, and scikit-learn basics. Understand tensors, array arithmetic, data loading, and the basics of classification and regression.
Follow three guidelines to succeed in this course: use the Q&A, meet prerequisites, and engage with conceptual notes (handwritten) and coding lectures by coding what you see.
learn how to handle a 403 error when downloading files from lazy programmers. download via your browser, then drag and drop the file into the Colab file explorer to upload.
Colab remains the official environment; updates occur as needed, replacing fitgenerator with fit, using tensorflow datasets and keras augmentation for images, and text vectorization layer for NLP.
Frame machine learning as a geometry problem, exploring regression and classification under supervised learning with two-feature examples.
Explore linear classification with logistic regression in tensorflow 2.0 using sigmoid activation, w^T x plus b, binary cross-entropy, and training with Adam, epochs, and accuracy metrics.
Learn linear classification using TensorFlow 2 on the breast cancer data set to predict malignant versus benign tumors, with practical coding, data loading, preprocessing, and model training.
Prepare linear regression in tensorflow by loading and normalizing data, building a no-activation dense model, training with mean squared error and sgd, and applying log-transform insights to moore's law.
Learn regression in TensorFlow 2 by loading CSV data, building a small Keras model, and analyzing slope to estimate exponential growth and time to double.
Compare linear regression and logistic regression, outlining their roles in regression and classification. Relate logistic regression to neurons, weights, the sigmoid function, and the all-or-nothing action potential in neural networks.
Learn how linear regression uses mean squared error as a cost, then apply gradient descent with a learning rate in TensorFlow's automatic differentiation to update weights and bias.
Learn how to generate predictions with TensorFlow models using fit and predict, convert probabilities to class outputs, and verify accuracy while handling 2D and 1D shapes.
Save a trained model with model.save(file_path) and reload it using tf.keras.models.load_model, mindful of a bug with explicit input layers and the workaround of specifying input shape in dense layers.
Google recommends using the API when implementing TensorFlow, so this course centers on Keras to simplify deep learning with multiple backends.
Provide feedback through the suggestion box to help improve your learning experience. Share your background, course, and difficulty, plus any missing explanations or topic requests to tailor future content.
Explore feed forward neural networks, inspired by brain neurons, and how architecture, activation functions, and multi-class classification extend linear models to unstructured data like images, text, and sound.
Pace yourself by focusing on the TensorFlow 2 API first, using an API-first approach with optional math, and outline high-level goals with words, pictures, and code.
Explore forward propagation in neural networks, expanding from single neurons to wide and deep layers, using sigmoid for binary classification and linear regression for regression tasks, with matrix-based formulations.
Discover how neural networks form nonlinear decision boundaries with multiple neurons and sigmoid activations. Learn that automatic feature learning via gradient descent replaces manual feature engineering.
Explore activation functions, comparing sigmoid, tanh, and relu variants; examine vanishing gradients, dead neurons, and the trade-offs of leaky relu, elu, and softplus for deep learning.
Learn multiclass classification by applying the softmax activation to produce a probability distribution over K categories, and contrast it with binary sigmoid for two-class tasks.
Explore how images are represented for deep learning: RGB color channels form a 3D tensor, 8-bit values scaled to 0–1, with grayscale as 2D, and flattening into vectors.
Discover why mixing primary colors doesn't always produce white and how RGB represents images in computers, with hands-on suggestions to experiment with RGB.
Build a 10-class handwritten digit classifier on the M.A. dataset of 28x28 grayscale images using a feedforward network with a 128-unit dense layer, dropout, softmax, and sparse categorical cross entropy.
Explore a tensorflow 2.0 neural network for image classification on the m.a. dataset. Load and normalize data, build a 2-layer model with dropout, and evaluate with a confusion matrix.
Explore a synthetic data regression with a neural network of two dense layers and a cosine target, visualizing the three-dimensional data and its predicted surface, noting extrapolation limits.
Show how to use the tf.data API with the breast cancer dataset to create train/test sets, train a binary classifier with batch data, and apply batch, shuffle, and map.
Discover convolution basics in neural networks with input and output images, a filter (kernel), and padding; learn how add and multiply produce blur, edge detection, and valid, same, full modes.
Explore how convolution acts as a sliding pattern finder using dot products, cosine similarity, and cross-correlation, revealing patterns in images.
Demonstrate the equivalence of convolution and matrix multiplication, using a one-dimensional example to show how repeating the filter creates a matrix; explain weight sharing for translational invariance and efficiency.
Extend convolution to color images by using three-dimensional inputs and filters, producing multiple feature maps that stack into a 3D output, with bias, activation, and parameter sharing.
Learn the typical cnn architecture: convolution and pooling layers shrink images while increasing feature maps, then flatten and dense layers, with stride and global pooling for varying sizes.
Explore convolutional neural network (CNN) code preparation using TensorFlow 2's functional API to build, train, evaluate, and deploy image classifiers on fashion-mnist and cifar-10 datasets.
Build a CNN in TensorFlow 2.0 for fashion mnist, with three 3x3 conv layers, dropout, and softmax, reshaping 28x28 grayscale images and evaluating via confusion matrices.
Explore image classification with a TensorFlow 2 convolutional neural network on CIFAR-10, via a prepared code lab notebook that builds, trains, and evaluates the model, covering data loading and overfitting.
Learn to boost model performance with data augmentation using TensorFlow's Keras image data generator, generating augmented batches on the fly with rotation, shift, brightness, zoom, and flips to improve generalization.
Introduce batch normalization to normalize data at every layer, learn gamma and beta for optimal scale and shift, and understand its regularization effects in CNNs.
Build a cnn classifier for cifar-10 with data augmentation, using the tf.keras functional API, conv-bn-maxpool blocks, dropout and softmax, trained for 50 epochs and evaluated without augmentation.
Learn about sequence data and time series in deep learning, including shapes n by t by d, one- and multi-dimensional data, and practical examples like stock, weather, speech, and text.
Forecast time series by predicting multiple future values over a horizon. Use linear regression as a baseline, then extend to multi-step forecasts with sequential inputs and past values.
Explore autoregressive linear models for time series forecasting by building a synthetic sine-wave dataset, training on the first half, and comparing one-step and multi-step forecasts, including noise effects.
Show how a linear model learns a sine wave using an R2 model with two pass values of the time series to perfectly forecast a non-linear time series.
Explore recurrent neural networks and how they model sequences with hidden states and time-step dependencies. Learn about shared weights across time steps and per-time-step predictions.
Learn to build a simple rnn in TensorFlow 2.0: load synthetic data, shape inputs to t by d, instantiate the rnn layer, and train, evaluate, and predict while handling shapes.
Explore using a recurrent neural network for time series prediction with sine waves, noise, and comparisons to autoregressive linear models. Learn about activation effects on forecasts and evaluation.
Explore how shapes influence art understanding. Track shapes with a manual recurrent neural network forward pass, detailing t, d, m, k, and the associated weight matrices and biases.
Explore how GRU and LSTM units address vanishing gradients with update and reset gates, convex combinations of new and past hidden states, and efficient gating to preserve long-term dependencies.
Compare GRU and LSTM architectures, showing how forget, input, and output gates control the hidden and cell states to preserve long-term dependencies; two papers suggest LSTM often outperforms GRU.
Explore a time series with a frequency that changes over time by squaring the sine input, comparing autoregressive linear models with ARNN and LSTM for forecasts.
Demonstrates learning long-distance dependencies using a three-point xor-like time series, comparing simple RNN, GRU, and LSD M (LSTM) units. Shows how global max pooling over hidden states mitigates memory challenges.
Treat images as a multi-dimensional time series, scanning rows to update a hidden state, and train a model with a final dense 10-output softmax activation.
Explore an rnn-based image classification on a 28 by 28 dataset using a prepared code lab notebook, training to about 99% accuracy and analyzing the confusion matrix.
Predict stock returns with LSTMs using real Starbucks data, exploring open, high, low, close, and volume, and applying scaling, windowing, and a supervised 10-step window approach.
reframe stock price prediction to stock return forecasting, and demonstrate vectorized data preparation, normalization, and training an autoregressive lstm model for single and multi-step forecasts.
Build and evaluate an LSTM-based stock return predictor using open, high, low, close and volume data, framing it as a binary up/down classification and highlighting overfitting and historical data limitations.
Explore different forecasting strategies, including one-step versus multi-step forecasts, baseline naive forecasts, and multi-output models, clarifying when to use each and concepts like the random walk.
Convert words to integers and map them to dense vectors with an embedding layer, replacing costly one-hot encoding. Train embeddings with gradient descent, yielding a trainable t-by-d input for RNNs.
Learn to prepare text data for natural language processing by tokenizing strings, building a word-to-index mapping, padding sequences, then embedding and feeding into an RNN.
Explore text preprocessing with the TensorFlow Keras text vectorization layer. Learn to adapt on sentences, build a vocabulary, map words to integers, and apply truncation, padding and ragged options.
Discover building a text classification model for spam detection with a rnn in TensorFlow, using a text vectorization layer, embedding, and lstm, and evaluating with f1 score on imbalanced data.
Explore how one dimensional convolution applies to text by treating embeddings as a sequence, using sliding filters, pooling, and dense layers for text classification.
Explore text classification with CNNs in TensorFlow, covering loading, encoding, building a CNN with embedding and global max pooling for spam detection, trained with binary cross-entropy and evaluated by F1.
Explore deep learning for recommender systems, using user and movie embeddings with a neural network to predict ratings from incomplete user-item-rating data and discussing matrix factorization.
Build a deep learning recommender using the movie lands dataset, converting user and movie ids to zero-based embeddings, then train a two-input neural network to predict ratings.
Explore transfer learning by using a pre-trained CNN body as a feature extractor. Train a new head, e.g., logistic regression for binary classification, with minimal data and faster training.
Explore pre-trained CNN architectures for transfer learning, including VGG variants (16, 19), ResNet with residual blocks, Inception with parallel filters, and MobileNet for lightweight models, plus input formats and preprocessing.
Master large image datasets stored on disk using image data generators and flow from directory. Apply batch gradient descent on memory-friendly batches, with data augmentation and class-based training folders.
Explore two transfer learning approaches: training the full cnn with data augmentation versus precomputing feature vectors z for logistic regression, noting tradeoffs in time and generalization.
Learn transfer learning with data augmentation in TensorFlow using a pre-trained VGG16 model, including input preprocessing, augmentation layers, and a dense classifier, with a comparison to a non-augmented approach.
Explains transfer learning without data augmentation by extracting feature vectors from a pre-trained model and training a top classifier, while highlighting vector representations that bridge vision and NLP.
Ever wondered how AI technologies like OpenAI ChatGPT, GPT-4, DALL-E, Midjourney, and Stable Diffusion really work? In this course, you will learn the foundations of these groundbreaking applications.
Welcome to Tensorflow 2.0!
What an exciting time. It's been nearly 4 years since Tensorflow was released, and the library has evolved to its official second version.
Tensorflow is Google's library for deep learning and artificial intelligence.
Deep Learning has been responsible for some amazing achievements recently, such as:
Generating beautiful, photo-realistic images of people and things that never existed (GANs)
Beating world champions in the strategy game Go, and complex video games like CS:GO and Dota 2 (Deep Reinforcement Learning)
Self-driving cars (Computer Vision)
Speech recognition (e.g. Siri) and machine translation (Natural Language Processing)
Even creating videos of people doing and saying things they never did (DeepFakes - a potentially nefarious application of deep learning)
Tensorflow is the world's most popular library for deep learning, and it's built by Google, whose parent Alphabet recently became the most cash-rich company in the world (just a few days before I wrote this). It is the library of choice for many companies doing AI and machine learning.
In other words, if you want to do deep learning, you gotta know Tensorflow.
This course is for beginner-level students all the way up to expert-level students. How can this be?
If you've just taken my free Numpy prerequisite, then you know everything you need to jump right in. We will start with some very basic machine learning models and advance to state of the art concepts.
Along the way, you will learn about all of the major deep learning architectures, such as Deep Neural Networks, Convolutional Neural Networks (image processing), and Recurrent Neural Networks (sequence data).
Current projects include:
Natural Language Processing (NLP)
Recommender Systems
Transfer Learning for Computer Vision
Generative Adversarial Networks (GANs)
Deep Reinforcement Learning Stock Trading Bot
Even if you've taken all of my previous courses already, you will still learn about how to convert your previous code so that it uses Tensorflow 2.0, and there are all-new and never-before-seen projects in this course such as time series forecasting and how to do stock predictions.
This course is designed for students who want to learn fast, but there are also "in-depth" sections in case you want to dig a little deeper into the theory (like what is a loss function, and what are the different types of gradient descent approaches).
Advanced Tensorflow topics include:
Deploying a model with Tensorflow Serving (Tensorflow in the cloud)
Deploying a model with Tensorflow Lite (mobile and embedded applications)
Distributed Tensorflow training with Distribution Strategies
Writing your own custom Tensorflow model
Converting Tensorflow 1.x code to Tensorflow 2.0
Constants, Variables, and Tensors
Eager execution
Gradient tape
Instructor's Note: This course focuses on breadth rather than depth, with less theory in favor of building more cool stuff. If you are looking for a more theory-dense course, this is not it. Generally, for each of these topics (recommender systems, natural language processing, reinforcement learning, computer vision, GANs, etc.) I already have courses singularly focused on those topics.
Thanks for reading, and I’ll see you in class!
WHAT ORDER SHOULD I TAKE YOUR COURSES IN?:
Check out the lecture "Machine Learning and AI Prerequisite Roadmap" (available in the FAQ of any of my courses, including the free Numpy course)
UNIQUE FEATURES
Every line of code explained in detail - email me any time if you disagree
No wasted time "typing" on the keyboard like other courses - let's be honest, nobody can really write code worth learning about in just 20 minutes from scratch
Not afraid of university-level math - get important details about algorithms that other courses leave out