AI News, Keras or PyTorch as your first deep learning framework

Keras or PyTorch as your first deep learning framework

Whether you want to start applying it to your business, base your next side project on it, or simply gain marketable skills –

picking the right deep learning framework to learn is the essential first step towards reaching your goal.

[Edit: Recently, TensorFlow introduced Eager Execution, enabling the execution of any Python code and making the model training more intuitive for beginners (especially when used with tf.keras API).] While you may find some Theano tutorials, it is no longer in active development.

Keras is a higher-level framework wrapping commonly used deep learning layers and operations into neat, lego-sized building blocks, abstracting the deep learning complexities away from the precious eyes of a data scientist.

PyTorch offers a comparatively lower-level environment for experimentation, giving the user more freedom to write custom layers and look under the hood of numerical optimization tasks.

Keras is indeed more readable and concise, allowing you to build your first end-to-end deep learning models faster, while skipping the implementational details.

Working with PyTorch may offer you more food for thought regarding the core deep learning concepts, like backpropagation, and the rest of the training process.

For instance, in the Dstl Satellite Imagery Feature Detection Kaggle competition, the 3 best teams used Keras in their solutions, while our deepsense.ai team (4th place) used a combination of PyTorch and (to a lesser extend) Keras.

Unique mentions of deep learning frameworks in arxiv papers (full text) over time, based on 43K ML papers over last 6 years.

their discussion board is a great place to visit to if you get stuck (you will get stuck) and the documentation or StackOverflow don’t provide you with the answers you need.

Anecdotally, we found well-annotated beginner level deep learning courses on a given network architecture easier to come across for Keras than for PyTorch, making the former somewhat more accessible for beginners.

The readability of code and the unparalleled ease of experimentation Keras offers may make it the more widely covered by deep learning enthusiasts, tutors and hardcore Kaggle winners.

For examples of great Keras resources and deep learning courses, see “Starting deep learning hands-on: image classification on CIFAR-10“ by Piotr Migdał and “Deep Learning with Python” –

For PyTorch resources, we recommend the official tutorials, which offer a slightly more challenging, comprehensive approach to learning the inner-workings of neural networks.

PyTorch saves models in Pickles, which are Python-based and not portable, whereas Keras takes advantages of a safer approach with JSON + H5 files (though saving with custom layers in Keras is generally more difficult).

Exporting PyTorch models is more taxing due to its Python code, and currently the widely recommended approach is to start by translating your PyTorch model to Caffe2 using ONNX.

play framework: to quickly build, train, and evaluate a model, without spending much time on mathematical implementation details.

Once you master the basics in one environment, you can apply them elsewhere and hit the ground running as you transition to new deep learning libraries.

PyTorch in 5 Minutes

I'll explain PyTorch's key features and compare it to the current most popular deep learning framework in the world (Tensorflow). We'll then write out a short ...

Deep Learning Frameworks Compared

In this video, I compare 5 of the most popular deep learning frameworks (SciKit Learn, TensorFlow, Theano, Keras, and Caffe). We go through the pros and cons ...

PyTorch Explained - Python Deep Learning Neural Network API

PyTorch is a deep learning framework and a scientific computing package. There's no better place to start as we'll be using PyTorch in this series to program our ...

Keras Explained

Whats the best way to get started with deep learning? Keras! It's a high level deep learning library that makes it really easy to write deep neural network models ...

How to Deploy Keras Models to Production

We'll train an image classifier in Keras using a Tensorflow backend, then serve it to the browser using a super simple Flask backend. We can then deploy this ...

Lecture 8 | Deep Learning Software

In Lecture 8 we discuss the use of different software packages for deep learning, focusing on TensorFlow and PyTorch. We also discuss some differences ...

How to Make a Text Summarizer - Intro to Deep Learning #10

I'll show you how you can turn an article into a one-sentence summary in Python with the Keras machine learning library. We'll go over word embeddings, ...

Installing CUDA, Tensorflow and Keras - Deep learning with neural networks and tensorflow

This tutorial covers the installation of CUDA which enables training deep learning models on Nvidia GPU. We'll also install Tensorflow and Keras along with all ...

How to install Tensorflow, PyTorch, Keras, Theano, CNTK and more on Windows

In this lecture I describe how to install all the common deep learning / machine learning / data science / AI libraries you'll need for my courses. I focus on ...

Javier from Simply Business - Working With PyTorch & Tensorflow