0% found this document useful (0 votes)
77 views15 pages

10 - Machine - Learning - Frameworks - To - Try - in - 2021 For Me

Uploaded by

khawla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views15 pages

10 - Machine - Learning - Frameworks - To - Try - in - 2021 For Me

Uploaded by

khawla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

INTRODUCTION 3

WHY DO YOU NEED MACHINE LEARNING FRAMEWORKS? 3

10 FRAMEWORKS TO TRY IN 2021 4

1 TENSORFLOW 4

2 PYTORCH 5

3 SCIKIT LEARN 7

4 APPLE’S CORE ML 8

5 H2O-3 9

6 APACHE MXNET 10

7 FASTAI 11

8 APACHE MLLIB 12

9 PYTORCH-LIGHTNING 13

10 MICROSOFT COGNITIVE TOOLKIT (CNTK) 14

ABOUT US 15
INTRODUCTION And the insights we’ll present today will show you how to leverage the right
machine learning frameworks to accelerate your organizational growth.
If you’d like first to step back and learn the differences between AI, ML,
Artificial intelligence is a $23bn market. And according to the latest and data science, click here.
estimates, it could pass $125bn by 2025. That’s a CAGR of over 30%, which
is phenomenal by any standards. But growth alone isn’t a reason for an Once you feel up-to-speed, read on for the all-important details.
enterprise to deploy AI.

So today, we’ll answer the questions, “Why should forward-thinking


leaders, like yourself, explore ways to use AI or ML in your organization?
And should you even care about the top ML frameworks in 2021?”
Image source – tensorflow.org

In short, we believe so: because artificial intelligence and machine learn-


ing can solve even the most complex business challenges.
WHY DO YOU NEED MACHINE LEARNING FRAMEWORKS?

To elaborate, the two technologies: At DLabs.AI, we cash in on machine intelligence and efficiency to build
Enable businesses to build effective, robust solutions in line with lean scalable enterprise solutions. That means we know how to leverage
methodology; technologies to solve complex business problems.
Have already crossed the chasm from hype to reality, proving themselves
a worthwhile investment. But what if your business doesn’t have this type of in-house expertise?
That’s where off-the-shelf ML frameworks come in. But their availability
That said, the technology is still relatively young. Yet executives have in- benefits both experienced and less experienced operators for three reasons.
creasing confidence in its power. Why so? Because industries from retail to
BFSI, education to sports, marketing to finance, have piloted AI and yielded Machine learning frameworks mean you can:
unprecedented results.
1. Access most of the necessary algorithms via libraries or open APIs;
For a pertinent example: look no further than the turbocharged research 2. Install the libraries as an add-on or integrate them as part of the respective
and development of COVID-19 vaccines. ML framework;
3. Use the libraries as they stand or customize them to your needs.

In the round, AI-ML is such a useful corporate tool because it unlocks agility ML frameworks are potent resources. They allow an organization to reduce
in organizational DNA. Put another way: it improves operational effective- the developer resource required to complete a project. At the same time,
ness. It can even unlock new growth channels. they significantly shorten the time to deployment.
3
10 FRAMEWORKS Deploy on Android, web, iOS, IoT devices, cloud clusters, CPUs, GPUs, and TPUs

TO TRY IN 2021
Different shades suit every need:
Tensorflow Lite for mobile
Tensorflow.js for training and deploying ML models in JavaScript
environments
We’ve worked with clients who’ve outsourced the development of custom
Tensorflo
ML solutions. Writing libraries from scratch is a rare occurrence. Normally,
we’ll build upon off-the-shelf frameworks to serve the business need.

Below you will find 10 frameworks that we recommend to learn this year. WHO ’S USING TENSORFLOW?
1 TENSORFLOW Google
Coca Cola
Airbnb
With 152k+ stars and 83k+ forks on GitHub, Tensorflow is the open-source
ARM
powerhouse of machine learning.
GE Healthcare
Lenovo
The Google Brain Team developed TensorFlow as a general end-to-end ML
Paypal
platform, using C++, CUDA, and Python. There are endless use cases for the
Swisscom
framework, but to give you an idea, here’s how we’ve used it:
Qualcomm
Image classification
Twitter
Image segmentation
China Mobile
Text classification using BERT
Text generation using RNN
Structured data classification
Speech recognition
WHEN SHOULD YOU AVOID TENSORFLOW?
The language has a steep learning curve, so it isn’t ideal for beginners.

WHY TENSORFLOW IS A GOOD ML FRAMEWORK:


TF is best deployed in multi-GPU environments but lags in performance
in single GPU environments.

Suits both simple and complex use-cases


Everyone from startups to SMEs to multinational enterprises can use
TensorFlow to unlock insights from text, images, and audio
Open-source and platform agnostic
Access high-level APIs (like Keras API, model subclassing API, Distribution
API) for a simpler way to get started 4
2 PYTORCH If we pit PyTorch against TensorFlow, we’d say TensorFlow is used compara-
tively more in deployment. But PyTorch has started to outpace TensorFlow
in terms of research paper count.
With 45k+ stars on Github, Facebook’s open-source ML framework, PyTorch,
is a strong TensorFlow rival (it can do pretty much everything TF does).
Could this be a signal of PyTorch’s future share in ML model deployments?
PyTorch is a community-driven Python package that’s intuitive, easy-to-use,
We believe so.
lean, and fast — empowering developers to:

Perform Tensor computations with strong GPU acceleration


Extend with NumPy, SciPy, Cython, etc.

The primary differentiator of PyTorch versus other machine learning frameworks


is its “reverse-mode auto-differentiation” technique, as illustrated below:

Source: State of AI Report - Slide13

PNG Source: GitHub

Traditionally, once neural networks are built, any modification require-


ments would translate into starting from scratch. But with reverse-mode
auto-differentiation, PyTorch enables you to modify how your neural
network behaves with almost zero overhead.

This means more flexibility and quicker development.

5
WHY PYTORCH IS A GOOD ML FRAMEWORK: WHEN
Useful in computer vision and for NLP-focused use cases This isn’t necessarily a time to avoid PyTorch but, if you can, it’s often
Eager execution mode better to use TensorFlow Lite in place of PyTorch mobile for imparting ML
Strongly Pythonic capabilities on edge devices. Or, if you’re a JS developer looking for a robust
Off-the-shelf loss and optimizer functions, easy data loading mecha- ML framework, then TensorFlowJS could be a better option.
nism, chaining built-in transformations
Comparatively easy learning curve
TorchServe and TorchScript have end-to-end workflows for major
platforms
PyTorch mobile for iOS, Android, and Linux
Facilitates distributed training with native support for asynchro-
nous execution of collective operations, peer-to-peer communica-
tion

WHO ’S USING PYTORCH?


Salesforce
NVIDIA
Apple
Facebook
UDACITY
Stanford

6
3 SCIKIT LEARN WHEN SHOULD YOU AVOID USING SCIKIT LEARN?
With 43.7k+ stars on GitHub, SciKit Learn is the third most popular SciKit Learn doesn’t suit GPU-based machine learning requirements.
framework for machine learning. It’s Pythonic (built on SciPy, Numpy, It’s also not built to run across clusters (Spark ML is more suited to cluster-
Matplotlib) and distributed under the BSD license. based ML applications).

WHY SCIKIT IS A GOOD ML FRAMEWORK:

Provides “classic” ML learning algorithms


One of the oldest frameworks, developed in 2007 (vs. 2015 for TensorFlow)
Great for classification and categorization of objects using SVMs, nearest
neighbors, random forest algorithms
Regression used in accelerated drug discovery and stock price prediction
Clustering, preprocessing, dimensionality reduction, and modal selection
help with customer segmentation and improved visualization of data
You may also easily implement k-means, grid-search, feature selection,
feature extraction, matrix factorization, and metrics.

WHO ’S USING SCIKIT LEARN?


JP Morgan
Spotify
Aweber
Booking.com
Evernote
OkCupid
Dataiku
DataRobot

7
4 APPLE’S CORE ML Integrate ML into a phone with no privacy intrusion, and lower memory/
battery requirements
Works cohesively with Apples’ Vision framework, NL framework, Speech
& Sound Analysis frameworks (these are domain-specific, functionality-
focused ML frameworks)
Using a vision machine learning framework, you can:
Detect objects in images (like faces in a selfie or barcodes)
Perform object trajectory detection & tracking in videos (like track-
ing players in a sports analysis app or consumer movement in a smart
CCTV camera app)
Other possibilities using natural language, speech, or sound analysis:
Perform text tokenization, semantic distance calculation between
words, language identification, text segmentation
Detect and process audio, either in pre-recorded format or live, using
If you want to make predictions using data from a user’s device, that’s the Speech framework (for speech-to-text conversions)
precisely what Apple’s core ML model lets you do. It integrates unified ML Leverage the MLSoundClassifier model trainer to integrate intelli-
models directly into an app, using end-user data to make predictions, train gent sound processing and identification into your app (for removing
the model — or improve the efficacy of the algorithm: breathing sounds or noise in streamed audio)

WHEN SHOULD YOU AVOID USING APPLE’S CORE ML?


Build text, image, motion, tabular, video, and audio models, then train
them using the createML app that ships with Xcode
Models built using createML are coreML compatible
Alternatively, you can build models using your preferred machine learn- If you need a platform-agnostic ML framework, then this one isn’t for you.
ing library and then use core ML tools (2k+ stars on GitHub) to convert Expanding to other platforms could be a cost-intensive deal. For a full-stack,
the model into a coreML format cross-platform machine learning framework, consider PyTorch or Tensor-
Flow.

WHY APPLE’S CORE ML IS A GOOD ML FRAMEWORK:

8
Source: Apple CoreML
5 H2O-3 WHEN SHOULD YOU AVOID USING H2O.AI?
H2O is a distributed, scalable, extensible in-memory platform with H20 isn’t the best for parallel running of multiple models while LDA
5.3k+ stars on GitHub. H2O provides off-the-shelf ML algorithms, like GLM, and GMMs clusterings are also unavailable. If performance is your pri-
XGBoost, Random forest, DNN, GAM, and k-means. And it’s easily extensible ority, consider open-source ML frameworks, like SciKit Learn, PyTorch,
with Hadoop, Spark, and other algorithms. or TensorFlow.

WHY
And if you prefer a strong community, consider one of the ML frameworks
H2O IS A GOOD ML FRAMEWORK: listed earlier in this document.

Intuitive interface for Java, Python, R, and more


Comes in two flavors: open-source and paid-for enterprise version
Useful in fraud detection, credit scoring, price optimization, anomaly
detection, KYC, HAI prediction
Widely used in insurance, finance, retail, and healthcare

WHO ’S USING H20.AI?


PayPal
Capital One
PwC
Wells Fargo
Amanda Health
Zurich insurance
Tech Mahindra
Macy’s
Booking.com

9
6 APACHE MXNET WHEN SHOULD YOU AVOID USING APACHE MXNET?
Apache MXNET is an open-source, lightweight machine learning frame- If you need more off-the-shelf features, there are frameworks that ship

work developed in partnership between Intel, the Apache software founda- ‘with batteries included.’ And consider using SciKit Learn or Keras for

tion, and an open-source community. research and prototyping.

With 19.2k+ GitHub stars, the framework enjoys vast community support.

WHY MXNET IS A GOOD ML FRAMEWORK:

Deeply integrated with Python


Provides bindings for Java, Julia, Perl, Scala, C++, and JS
A rich library and robust ecosystem of tools enable engineers to build
and train models for CV, NLP, and time-series
Supports distributed training — and recently introduced support for
HOROVOD (Uber’s open source ML framework)
Gluon API powers seamless transitions between an imperative and
symbolic mode for boosted speed as well as flexibility

WHO ’S USING APACHE MXNET?


ByteDance
Samsung
Amazon
Acer
CMU
MediaNet

10
7 FASTAI WHY FASTAI IS A GOOD ML FRAMEWORK:

Built-in algorithms, with state-of-the-art configuration, mean you can


avoid building and, instead, test ready-made models as a solution
Enjoys a decoupled abstraction of DL and data processing techniques
Boasts the robustness of Python and the flexibility of PyTorch
Easy to migrate from sister libraries
Start learning without downloading (using Google Colab)
Optimized for effective GPU utilization

WHEN SHOULD YOU AVOID USING FASTAI?


Some claim it’s difficult to implement low-level functionalities using FastAI,
so it should be preferred more for research and learning and less for pro-
duction.

Source: FastAI

FastAI enjoys 20k+ GitHub stars. Its mission is to democratize deep learning
through its free MOOCs (massive open online courses).

FastAI boasts high-level components for building quick ML model


prototypes — alongside low-level component access for researchers to
experiment and build models with innovative approaches.

11
8 APACHE MLLIB WHEN SHOULD YOU AVOID USING APACHE MLLIB?
Apache MLlib is part of the Apache Spark project. Apache Spark is highly Apache MLlib lags in evaluation and result representation as its API doesn’t

popular among big data engineers, earning 28k+ stars on GitHub. support direct extraction of probabilities with multiclass (Top-k error).
The confusion matrix isn’t well displayed either — while for smaller data-sets,
we prefer SciKit Learn.
WHY APACHE MLLIB IS A GOOD ML FRAMEWORK:

Highly scalable
Easy to integrate with Hadoop
Use it with your preferred language: supports Java, R, Python, and Scala
Models can run on standalone clusters in EC2 — or Hadoop YARN, Mesos,
or Kubernetes
Has a colossal algorithm library of classification, regression, decision trees,
recommendation, k-means-clustering, GMM, LDA, and more
Leverages iteration and claims to be 100x faster than MapReduce (which
uses pass approximations)
Workflow includes standardization, normalization, and other feature
transformations
Includes tools for constructing, evaluating and tuning, and saving pipelines
Provides utility tools for linear algebra, handling of data, and more

12
9 PYTORCH-LIGHTNING WHEN SHOULD YOU AVOID USING PYTORCH-LIGHTNING?
PyTorch-lightning is a lightweight PyTorch wrapper for high-performance It helps to remember that Pytorch-lightning is just a high-level wrap-
AI research. per for PyTorch. If your organization has Pytorch talent, it makes sense to
use it. – if not, look elsewhere. For smaller datasets, consider other solutions
It scores 11k+ stars on Github — and was designed for developing self- such as Keras.
-contained deep learning systems with highly-fragmented code to ensure
maximum flexibility and minimum boilerplate code.

WHY PYTORCH-LIGHTNING IS A GOOD ML FRAMEWORK:


Great for AI researchers and equally valuable for those new to AI-ML
development
Used by professional production teams who struggle to scale ML models
with PyTorch without introducing bugs
Organizes code into “engineering, research, non-essential research and
data” segments, enabling an abstraction of the details about model train-
ing and making research projects readable, iterable, and scalable
GPU/TPU training, distributed cluster training, logging, visualizing, and
checkpointing helps automate 40+ parts of machine learning projects,
meaning fewer errors and faster development
Provides out-of-the-box integration with logging/visualization frameworks
like tensorBoard and Neptune

WHO ’S USING PYTORCH-LIGHTNING?


Microsoft
Intel Labs
Facebook Research
ML flow
NVIDIA
Allen AI 13
10 MICROSOFT COGNITIVE WHEN SHOULD YOU AVOID USING CNTK?
TOOLKIT (CNTK) The last stable release of CNTK was 19 months ago, highlighting the
framework’s not-so-frequent updates. It’s also not ideal for delivering ML
CNTK is a robust framework with community-driven popularity of capabilities to mobile devices.
17k+ stars on GitHub. But be wary that this unified toolkit doesn’t support
model deployment to mobile devices. In that instance, Keras, IBM Watson, Azure ML, Google AI, and TensorFlow
are good alternatives.

WHY CNTK IS A GOOD ML FRAMEWORK:


Integrate as a library in C#, C++, and python
Functions as a full-blown ML framework too
Easy to leverage DNN, CNN, RNN, and more
CNTK Python API provides abstractions for computing and learning
algorithms, with in-built scalable data readers optimized for different
types of data, including text, image, and speech, eliminating the need
to author any data reading code
API abstraction makes it flexible and compact for engineers to train
arbitrary neural networks (ANN)
Other than Python, API abstraction is available for C++, Java, and C#/.Net
Suited for 64-bit Linux or Windows environment

WHO ’S USING CNTK?


Sotong Kitchen
Spark Cognition
Boston Scientific
NVIDIA
Seattle Genetics
Amazon

14
ABOUT US
DLabs.AI is a leading Central European software development and consulting company designing and creating automated, custom-built AI software
solutions for business. Our team includes data science and software development experts specialized in neural networks, machine learning, and natural
language processing to support sales and marketing, customer service, manufacturing, health, finance, and more.

CONTACT
DLabs Sp. z o.o.

ul. Gen. de Gaulle’a 3A/2

80-261 Gdańsk

www.dlabs.ai

t. +48 (58) 743 64 17

e. [email protected]

SOCIAL MEDIA
fb.com/DlabsAi

linkedin.com/company/dlabsai

@DLabsAI

@DlabsAI

15

You might also like