Three Examples
Two Quick Tutorials
Introduction and Hands-On Tutorial
Building, Training and Scaling Residual Networks on TensorFlow
Working with CNN Max Pooling Layers in TensorFlow
Two Quick Tutorials
Tutorials
Three Quick Tutorials
Three Quick Tutorials
Introduction and Tutorials
A Practical Guide
Building, Training and Scaling Residual Networks on PyTorch
Building, Training & Scaling Residual Nets on Keras
Working with CNN 2D Convolutions in Keras
Working with 1D Convolutional Neural Networks in Keras
Key Approaches and Tutorials
Introduction and Examples
Convolutional Neural Networks (CNN) are the foundation of implementations of deep learning for computer vision, which include image classification. TensorFlow lets you build CNN architectures with tremendous flexibility, but can be a bit challenging at first. We’ll show you three examples that outline the process, and explain how to easily track and manage your experiments with the MissingLink deep learning platform.
If you’re working on a CNN project, you probably have a large dataset and need to run your experiments on several machines.
This can become challenging, and you might find yourself spending serious time on setting up machines, copying data and troubleshooting, instead of building a winning experiment.
MissingLink is a deep learning platform that lets you effortlessly scale TensorFlow CNN models across many machines, either on-premise or in the cloud. It also helps you manage large data sets, manage multiple experiments, and view metrics and hyperparameters across your team on one convenient dashboard.
Sign up for a free MissingLink account and see how easy it is.
What is a tensor?
A tensor is a way to represent deep learning data. It is a multidimensional array, used to store data for multiple features of a dataset, where each feature represents an additional dimension. For example, a 3-dimensional tensor is a “cube” storing values along three axes.
What is a computational graph?
The TensorFlow computational graph represents the flow of operations that occur during training of a deep learning model. For CNN models, the computational graph can be quite complex. Below is an example of a simple graph. You can visualize your model’s computational graph using TensorBoard – learn more about TensorFlow visualization .
What is a constant?
Used in TensorFlow to store constant values that don’t change. Used for nodes that are required to stay the same throughout model training. A constant does not take inputs.
What is a placeholder?
Used to feed input when running a model. A placeholder can take parameters, and so it can be modified in runtime, while you are running the computational graph.
What is a variable?
Used to modify the computational graph, adding parameters or nodes to the graph which are trainable.
TensorFlow API levels
TensorFlow lets you work directly with Tensors to build a neural network from the ground up. However, instead of using these low-level APIs which can be quite complex, TensorFlow recommends working with the higher-level Estimators API. This API enables object detection in TensorFlow, allowing you to define an object, at a higher level of abstraction, which creates and trains deep learning structures.
Image Source: TensorFlow
A great way to get started with CNN on TensorFlow is to work with examples based on standard datasets. These datasets are built into TensorFlow and will give you predictable results, helping you learn to run and tune a model.
The TensorFlow MNIST example builds an object detection TensorFlow Estimator that creates a Convolutional Neural Network, which can classify handwritten digits in the MNIST dataset. Below are the general steps;
Architecture:
Process:
Example code and tutorial: https://www.tensorflow.org/tutorials/estimators/cnn
This is a slightly more advanced example using 28×28 grayscale images of 65,000 fashion products in 10 categories. The dataset was presented in an article by Xiao, Rasul and Vollgraf, and is not built into TensorFlow, so you’ll need to import it and perform some pre-processing.
Architecture: The model uses three convolutional layers:
Process:
Source: TensorFlow
Example code and tutorial: https://www.datacamp.com/community/tutorials/cnn-tensorflow-python
This example shows how to build a CNN on TensorFlow without an object detection Estimator, using lower level APIs that give you much more control over network structure and parameters, because you’ll create custom object detection in TensorFlow.
In this example, you classify an RGB 32×32 pixel image across 10 categories: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck. The example includes a multi-GPU version which will show you how to scale up your model.
Architecture: Alternating convolutions and nonlinearities, followed by fully connected layer, ending with a softmax classifier.
Process:
Example code and tutorial:
In this article we explained how to run Convolutional Neural Networks on TensorFlow. When you start working on CNN projects, processing and generating predictions for real images, audio and video, you’ll run into some practical challenges:
Tracking experiment progress, source code, and hyperparameters across multiple CNN experiments. CNNs can have many different architectures and parameter tweaks, and testing each of these will require running and tracking large numbers of experiments.
A CNN is computationally intensive, and projects will likely require multiple machines or GPUs. Provisioning these machines, distributing experiments on them and monitoring experiments as they run can become a burden.
CNN projects usually involve images or video, and training sets can get huge, up to Gigabytes or Petabytes of data. Copying this data to each training machine and replacing it for different experiments can be time consuming and error prone.
The most comprehensive platform to manage experiments, data and resources more frequently, at scale and with greater confidence.
The most comprehensive platform to manage experiments, data and resources more frequently, at scale and with greater confidence.
MissingLink is the most comprehensive deep learning platform to manage experiments, data, and resources more frequently, at scale and with greater confidence.
Request your personal demo to start training models faster