Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Create a Neural Network in Java
Rating: 4.7 out of 5(123 ratings)
1,003 students

Create a Neural Network in Java

Artificial Neural Networks in Java, From Scratch
Created byJohn Purcell
Last updated 4/2026
English
English [Auto],

What you'll learn

  • Create a neural network from scratch in Java
  • Understand how to use neural networks for handwritten digit recognition
  • Implement the backpropagation algorithm
  • Use neural networks for categorisation

Course content

12 sections197 lectures18h 4m total length
  • Introduction6:24

    Develop a neural network from scratch in Java, using no external libraries, with supervised learning and deep learning concepts, and build a feedforward network featuring input, hidden, and output layers.

  • Why Write a Neural Network?4:57

    Understand why writing a neural network from scratch can be worthwhile, despite powerful free libraries, by gaining deep knowledge of mathematics and information theory.

  • Getting the Most Out of This Course5:16

    Follow along with the code to get the most out of this course, copy or write your own version, and explore mathematics, PDFs, and the GitHub repository for neural networks.

  • Java vs Python9:32

    Compare Python-backed neural networks with a Java-based implementation, using the nest dataset of handwritten digits, training across epochs to measure accuracy, then build a pure Java network without TensorFlow.

  • Neurons3:40

    Explore how neurons inspire neural networks by detailing input reception, dendrites, threshold firing through the axon, and weighted connections in a simplified digital model.

  • Perceptron5:20

    Explore the perceptron algorithm, where an artificial neuron weights inputs, sums them with a bias, and uses an activation function to produce 0 or 1, then implement in Java.

  • A Project With JUnit Support6:18

    Create a simple perceptron style neuron in Java and set up a Maven project with JUnit support using Eclipse, preparing for unit testing.

  • Coding Perceptron6:34

    Build a simple Java perceptron with two inputs, weights 0.5 and 0.5, and a bias 0.5, computing a weighted sum Z and activation A.

  • Where to Find the Source Code3:01

    Find the course code on GitHub at cave of programming, in the neural network Java repository, with versioned commits for each video and options to download or browse files.

  • Eclipse Formatters1:19

    Set up an eclipse java code formatter in eclipse preferences, create a new formatter profile jwt, and enable off on tags to selectively disable formatting for code ranges.

  • Logic Gates5:56

    Explore logic gates and truth tables, including and, or, xor, nor, nand, and xnor, and assess how a perceptron-style neuron can implement these gates.

  • Perceptron AND9:37

    Use a perceptron style neuron in Java to implement an and gate with weights and bias, producing truth table and noting which gates cannot be represented by a single perceptron.

  • OR, NOR, NAND6:40

    Develop a neural network in java by building perceptron-based logic gates (or, nor, nand, not), tuning weights and bias, and combining them to realize xor and xnor.

  • XOR and XNOR5:04

    Explore how to implement xor and xnor using perceptron neurons by combining and, or, nand, and nor gates and truth tables, verifying outputs 0110 for xor and 1001 for xnor.

  • Linear Separability6:36

    Demonstrate how a perceptron neuron classifies points using flat planes and why this limits recognizing handwritten digits; show how changing the activation function enables non-linear decision boundaries for digit recognition.

  • Some Layer Terminology5:10

    Explore how to network artificial neurons with nonlinear activation functions using linear mathematics and per-neuron weights to form weighted sums across layers, then translate the math into code.

  • Labelling Weights5:49

    Multiply each input by its weights, add the neuron’s bias, and apply an activation to produce the layer’s outputs, using previous activations as inputs with clear weight indices.

  • Matrices5:07

    See how neural networks produce neuron activations by multiplying weight matrices with input vectors, adding biases, and applying activation functions, highlighting matrix multiplication, tensors, TensorFlow, and graphics applications.

  • Some Mathematical Terminology4:08

    This lecture clarifies mathematical terminology used in neural networks, explaining matrices as two-dimensional arrays, vectors as one-dimensional arrays, and tensors of order two, with examples of matrix multiplication.

Requirements

  • Basic understanding of Java programming

Description

Learn how to create and use neural networks in your Java programs. This course teaches you not only how to implement machine learning AI with your own artificial neural networks (ANNs), but also the principles of how artificial neural networks work — to the point that you can implement your own.

You'll need only a knowledge of Java programming and basic algebra; in this course you'll learn the relevant linear algebra, information theory and calculus, and together we'll build a fast and efficient neural network from scratch, able to recognise handwritten digits and easily adapted to other tasks.

Among other things, we’ll cover:


  • What artificial neural networks are and how to write them yourself

  • How matrixes and linear algebra can be used to create efficient neural networks

  • The basic principles of the calculus needed to train your networks

  • Writing and organising fast, efficient, multithreaded neural network code

  • The fundamental information theory concepts that can enable us to evaluate our neural network performance

  • Training your network on the freely-available MNIST hand-written digit database

After taking the course, artificial neural networks won't be a mystery to you any more. You'll be able to write your own neural networks and integrate them seamlessly into your Java programs, and understand in detail how they work.

Whether you’re completely new to neural networks and the relevant mathematics, or you’re using neural network libraries and you know some mathematics but you just don’t know how it all actually works and fits together, this course aims to clear up all the mystery.

Artificial intelligence is an increasingly important technology in the modern world, and this course will teach you the fundamentals of perhaps the most important building block of it.

Who this course is for:

  • Java programmers who want to get started with artificial intelligence