Nx Course

What's in this preview?

We want you to get the feel for typical Groxio content and the reasons we provide each type of content. Each Groxio module comes in four scheduled releases consisting of the central PDF, videos, and resource links. Later releases have projects as well. You can see part of the first release here.

Numerical Computing for Elixir

Buy Course Today!

Preview PDF!

Preview Epub!

Release Schedule: 2021-09-01 through 2021-11-08

Version: Sept 1, 2021

Just $70.00, A La Carte
(other options available)

Programmer Passport Nx

Why a book?

The scientific teaching method we follow is the Dreyfus learning model. Books provide the metaphors experts need to build context, step-by-step instructions for beginners, and the exercises that intermediates need to learn.


1. Design and Setup

2. A linear regression

3. Axon Basics

4. Axon CNNs

Why an itinerary?

The itinerary is a virtual guide. This optional list describes the highlights of each release to maximize your learning time.


Nx is a library for building numerical computing applications, the so-called STEM applications, in Elixir. Rather than using basic Elixir numeric datatypes and lists, Nx uses tightly integrated pluggable backends to implement support for efficient types and structures. The result is a seamless and smooth experience.

The Nx project already has an impressive list of smaller projects underway. The LiveBook takes advantage of Phoenix LiveView and Nx to provide a place to collaboratively share research projects with data, code, and prose. The EXLA project provides support for Google’s excelerated linear algebra within a LiveBook. Compiler support and backends provide tight integration to efficient STEM libraries in other langauges.


Nx has been around a short time. In 2020, Sean Moriarity was working on Genetic Algorithms in Elixir. He was using several techniques to do ad-hoc machine learning in Elixir. José Valim, creator of Elixir, connected with him in late 2020 to explore building a robust library for numerical computation. Together, they built the core of Nx and Axon. The project has rapidly made progress with the introduction of LiveBook, and the number of contributors has steadily grown, but the project is still in its infancy.

Course Objectives

Over the course of this module, you’ll learn the core abstractions of Nx. Rather than drilling you on the various internal functions that make up the Nx API, you’ll learn the basic core abstractions for working with tensors on backends in Nx, share your work with live plots in a LiveBook, and use those concepts in the context of the Axon machine learning library.

When you’re done, you’ll be able to:

  1. Create, manipulate, shape, and name multi-dimensional data in tensors.

  2. Work with Nx using alternative backends.

  3. Write your own tensor-aware custom code with numeric definitions, and use transformations to broadcast to tensors so that you can tell if two tensors are compatible.

  4. Work with plots within a LiveBook, and use those plots to communicate your results to others.

  5. Build, train, and save Axon models to solve your own machine learning problems.

  6. Understand new Axon models as they emerge.


Public & Private

Why videos?

Groxio language modules have two kinds of videos. Our overview videos set the history and context of a language, or wrap up the work we've done, and are free to support language ecosystems. Our coding instruction videos, mostly starting with the second release, are paid content, and each one offers a live coding project.

Every learning level benefits from pair programming. Our videos are professional, but do not scrub away every tiny mistake. That way, you can see how experienced programmers deal with errors and changes in code organization.

1. Elixir Axon: A FizzBuzz Demo

Elixir's Nx is a numerical computing library for Elixir. This video is a demo showing where this course will be going over three months. We'll start with Nx and the primitives, explore tensors in the context of a LiveBook, and then shift to using Nx in practice with the Axon machine learning library.

2. Nx: Overview and Creating Tensors

Elixir's Nx library is fundamentally about creating tensors. This video will provide an overview of the Nx umbrella project and walk through the basics of creating tensors and using them in operations. We'll look at the primitives that create tensors, their components, and how to manipulate them.


3. Nx: Numerical Definitions and defn

Mathematical functions in numeric computing often require formulas that must interact with tensors using the basic rules of linear algebra. Nx provides numerical definitions for that purpose. These functions replace pure Elixir primitives with tensor-aware alternatives.
Subscriber content


4. Nx: Broadcasting Compatible Tensors

Often when you work with tensors, you must make two tensors with similar shapes interact. Nx has an operation called a broadcast that makes the shapes of two similar tensors match. To understand how operators work in Nx, you must understand broadcast.
Subscriber content

5. Nx: Ways to Create Tensors

Nx developers typically use alternative functions to the usual Elixir functions that manipulate enumerables. Learning these functions will help you navigate Nx quickly because they are more performant and concise than the typical Elixir alternatives.


6. Nx: Slicing Tensors to Access Data

Accessing data in a tensor is not always as easy as providing indexes in multiple dimensions. This video explores slicing in the context of a LiveBook. Ranges and named axes are critical techniques you'll learn in this brief exploration of Nx basics.
Subscriber content

Community Resources

Cool quick trips for Nx

Why resource links?

Each new chapter has a set of links, separated into three categories. The categories reflect different competency levels and resources that match that stage of learning, for each Groxio release.

Learn It

These resources will get you on the path to learning with background information, tooling and exercises.

Do It

You decide how deep to go. These resources are exercises and projects to cement your learning.

Grok It

These resources will help you put your new knowledge into context so you'll be better at your everyday job.


Longer Excursions (chapters 3 and 4)

Why projects?

The Dreyfus model is originally instruction for pilots. A typical pilot course is based on reading material to understand context, and then flying a plane. Our videos and PDFs are important, but in the end, programmers need to program in order to learn. Our projects offer different levels of assistance, from "give me the answer" to "make this test pass".