Practical tutorials and labs for TensorFlow used by Nvidia, FFN, CNN, RNN, Kaggle, AE

Overview

TensorFlow Tutorial - used by Nvidia

Learn TensorFlow from scratch by examples and visualizations with interactive jupyter notebooks. Learn to compete in the Kaggle leaf detection challenge!

All exercises are designed to be run from a CPU on a laptop, but can be accelerated with GPU resources.

Lab 1-4 was used in the Deep Learning using TensorFlow in London by Nvidia and Persontyle

Credits

Labs 1, 2, 3 and 5 have been translated from Theano/Lasagne with minor modifications from the following repositories: Nvidia Summer Camp and 02456 deep learning. Original authors: skaae, casperkaae and larsmaaloee.

Thanks to professor Ole Winther for supervision and sponsoring the labs.

Setup and Installation

Guides for downloading and installing TensorFlow on Linux, OSX and Windows using Docker can be found here.

Material

The material consists of 5 labs.

Lab1 - FFN

Logistic regression, feed forward neural network (FFN) on the (in)famous MNIST!

Optional reading material from Michael Nielsen chapters 1-4 (Do 3-5 of the optional exercises).

Lab2 - CNN

Convolutional Neural Network (CNN) and Spatial Transformer on images.

Optional reading material from Michael Nielsen chapter 6 (stop when reaching section called Other approaches to deep neural nets).

Lab3 - RNN

Recurrent Neural Network (RNN) on Translation using Encoder-Decoder model and Encoder-Decoder with attention.

Optional reading material from Alex Graves chapters 3.1, 3.2 and 4,

Lab4 - Kaggle

Compete in the kaggle competition Leaf Classification using FFN, CNN and RNN.

Lab5 - AE

Unsupervised learning with autoencoder (AE) reconstructing the MNIST from only two latent variables.

Optional reading material from deeplearningbook.org chapter 14.

Comments
  • Only folders available in container(shared directory)

    Only folders available in container(shared directory)

    I have cloned the repository to C:\Users\Mathias\Desktop\Docker so that i have C:\Users\Mathias\Desktop\Docker\tensorflow_tutorial\download-and-setup and so on. if I run the following command: docker run -p 8888:8888 -v C:\Users\Mathias\Desktop\Docker\tensorflow_tutorial:/mnt/myproject -it alrojo/tf-sklearn-cpu I have a folder named tensorflow_tutorial within /mnt/myproject/ but no files. If i change the folder for sharing i can see subdirectories but not still not the content of these. I feel like the point of a shared directory is to be able to share files?

    opened by ellonde 9
  • How to make prediction for new cases in lab3_RNN ?

    How to make prediction for new cases in lab3_RNN ?

    Hi ,

    Its more or like a pull request . You have defined both training and validation in the decoder itself . So , I know the idea behind making new prediction .

    The problem with the validation inside tf_utils.decoder is , it is always expecting the target . But for making a prediction ( without having targets , basically predicting the target ) , we need to have a separate function . How to write that ? I know , the idea , taking the first target as EOS , and then keep on finding the argmax until we reach max_length or another EOS . Can you help to make a function , doing the same ?

    opened by s4sarath 7
  • Print tails

    Print tails

    I had a suggestion, but realized it was not a big deal. And I don't know how to delete my own issue.

    Thanks a lot for the tutorial. I have learned so much!

    opened by alexhallam 1
  • Just a little typo

    Just a little typo

    
    print("operations")
    operations = [op.name for op in tf.get_default_graph().get_operations()]
    print(operations)
    print
    
    print("variables")
    variables = [var.name for var in tf.all_variables()]
    print(operations)
    

    The print on last line should be: print(variables)

    opened by alexhallam 1
  • Lab4 Kaggle - argument typo

    Lab4 Kaggle - argument typo

    In lab4 "Build the model", convolutional2d is called as

    # wrapping conv with batch_norm
    def conv(l_in, num_outputs, kernel_size, scope, stride=1):
        return convolution2d(l_in, num_outputs=num_outputs, kernel_size=kernel_size,
                             stride=stride, normalize_fn=batch_norm, scope=scope)
    

    Which produces:

    TypeError: convolution2d() got an unexpected keyword argument 'normalize_fn'

    It should be "normalizer_fn". Adding that missing R makes it works perfectly.

    opened by LecJackS 1
  • tf.pack should be renamed to tf.stack

    tf.pack should be renamed to tf.stack

    In lab2_CNN/lab2_CNN.ipynb, there is an AttributeError: 'module' object has no attribute 'pack'. It should be renamed to tf.stack according to https://www.tensorflow.org/install/migration.

    opened by umbraclet16 1
  • Docker

    Docker

    Hi alrojo,

    I am sure that most people have had some experience with docker. I have never used it so I had some difficulty getting Tensorboard up with the following commands. I also checked out the man page, but it seemed that there were multiple options for one flag. Would you be able to expound on the following commands?

    > docker run -p 6006:6006 -v $PATH\_TO\_FOLDER/tensorflow_tutorial:/mnt/myproject -it alrojo/tf-sklearn-cpu
    > cd mnt/myproject/lab6_Kaggle
    > tensorboard --logdir=tensorboard
    

    Thanks again for the great tutorial!

    opened by alexhallam 0
Owner
Alexander R Johansen
CS PhD Candidate
Alexander R Johansen
Using a Seq2Seq RNN architecture via TensorFlow to predict future Bitcoin prices

Recurrent Bitcoin Network A Data Science Thesis Project About This repository contains the source code for implementing Bitcoin price prediciton using

Frizu 6 Sep 8, 2022
NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

null 5 Nov 3, 2022
Implements Stacked-RNN in numpy and torch with manual forward and backward functions

Recurrent Neural Networks Implements simple recurrent network and a stacked recurrent network in numpy and torch respectively. Both flavours implement

Vishal R 1 Nov 16, 2021
Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow

Mask R-CNN for Object Detection and Segmentation This is an implementation of Mask R-CNN on Python 3, Keras, and TensorFlow. The model generates bound

Matterport, Inc 22.5k Jan 4, 2023
Algorithmic Trading using RNN

Deep-Trading This an implementation adapted from Rachnog Neural networks for algorithmic trading. Part One — Simple time series forecasting and this c

Hazem Nomer 29 Sep 4, 2022
A pytorch implementation of Pytorch-Sketch-RNN

Pytorch-Sketch-RNN A pytorch implementation of https://arxiv.org/abs/1704.03477 In order to draw other things than cats, you will find more drawing da

Alexis David Jacq 172 Dec 12, 2022
LSTMs (Long Short Term Memory) RNN for prediction of price trends

Price Prediction with Recurrent Neural Networks LSTMs BTC-USD price prediction with deep learning algorithm. Artificial Neural Networks specifically L

null 5 Nov 12, 2021
RNN Predict Street Commercial Vitality

RNN-for-Predicting-Street-Vitality Code and dataset for Predicting the Vitality of Stores along the Street based on Business Type Sequence via Recurre

Zidong LIU 1 Dec 15, 2021
Emotion classification of online comments based on RNN

emotion_classification Emotion classification of online comments based on RNN, the accuracy of the model in the test set reaches 99% data: Large Movie

null 1 Nov 23, 2021
Pytorch implementation of the popular Improv RNN model originally proposed by the Magenta team.

Pytorch Implementation of Improv RNN Overview This code is a pytorch implementation of the popular Improv RNN model originally implemented by the Mage

Sebastian Murgul 3 Nov 11, 2022
Static Features Classifier - A static features classifier for Point-Could clusters using an Attention-RNN model

Static Features Classifier This is a static features classifier for Point-Could

ABDALKARIM MOHTASIB 1 Jan 25, 2022
An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

null 0 May 6, 2022
TensorFlow CNN for fast style transfer

Fast Style Transfer in TensorFlow Add styles from famous paintings to any photo in a fraction of a second! It takes 100ms on a 2015 Titan X to style t

null 1 Dec 14, 2021
NVIDIA Merlin is an open source library providing end-to-end GPU-accelerated recommender systems, from feature engineering and preprocessing to training deep learning models and running inference in production.

NVIDIA Merlin NVIDIA Merlin is an open source library designed to accelerate recommender systems on NVIDIA’s GPUs. It enables data scientists, machine

null 419 Jan 3, 2023
A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

Eugenio Herrera 175 Dec 29, 2022
Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation. Intel iHD GPU (iGPU) support. NVIDIA GPU (dGPU) support.

mtomo Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation.

Katsuya Hyodo 24 Mar 2, 2022
Build and run Docker containers leveraging NVIDIA GPUs

NVIDIA Container Toolkit Introduction The NVIDIA Container Toolkit allows users to build and run GPU accelerated Docker containers. The toolkit includ

NVIDIA Corporation 15.6k Jan 1, 2023
A set of simple scripts to process the Imagenet-1K dataset as TFRecords and make index files for NVIDIA DALI.

Overview This is a set of simple scripts to process the Imagenet-1K dataset as TFRecords and make index files for NVIDIA DALI. Make TFRecords To run t

null 8 Nov 1, 2022