Practical MNIST with Kotlin
180 pages
English
PDF
4.5

Practical MNIST with Kotlin

Practical MNIST with Kotlin

Author:

Year:

Summary:

Introduction

The book "Practical MNIST with Kotlin" (author — M. Nakamura, 2020, 180 pages) is a unique practical guide to building a neural network for handwritten digit recognition in Kotlin. Unlike most educational materials that focus on Python, this book fills a gap for developers working in the JVM ecosystem who want to learn machine learning without switching languages.

What the book is about

The book is dedicated to solving the classic MNIST problem (handwritten digit recognition) using Kotlin. The author guides the reader step by step from setting up the environment to building and training a fully connected neural network. The main focus is on practical implementation: code analysis, mathematical foundations (gradient descent, backpropagation), and result visualization. All examples are written in pure Kotlin without third-party deep learning libraries, allowing for a deeper understanding of the internal mechanisms of neural networks.

Who this book is for

The book is intended for developers already familiar with the basics of Kotlin (syntax, OOP, functional programming) who want to learn machine learning. It will be useful for:

  • Android developers who want to integrate ML models into mobile applications;
  • Java/Kotlin programmers transitioning to the field of Data Science;
  • technical students studying neural networks in practice;
  • anyone who wants to understand how neural networks work "under the hood," without high-level abstractions.

What the reader will learn

After reading the book, you will be able to:

  • Set up a Kotlin project for working with MNIST data;
  • Implement image loading and preprocessing (normalization, conversion to vectors);
  • Build a fully connected neural network from scratch: layers, activation functions (sigmoid, ReLU), weight initialization;
  • Implement the backpropagation algorithm and gradient descent;
  • Train the model on the training set and evaluate accuracy on the test set;
  • Visualize the training process (loss and accuracy graphs);
  • Save and load the trained model for future use.

Strengths

The main advantage of the book is its maximum practicality. Each chapter contains complete code that can be run immediately. The author does not use ready-made frameworks (TensorFlow, PyTorch), which forces the reader to implement all components of the neural network independently — this provides a deep understanding of the topic. The book is written in simple language, with mathematical calculations accompanied by comments and explanations. The well-structured organization is also worth noting: from simple to complex, with clear goals for each chapter.

Who it is recommended for

We recommend the book to all Kotlin developers who want to take their first step into machine learning. It will also be useful for teachers looking for practical material for courses on neural networks on the JVM. If you are already familiar with ML in Python but want to transfer your skills to Kotlin, this book will be an excellent bridge. The only limitation: the book does not cover modern architectures (convolutional networks, RNNs) and is not intended for production solutions, but as an introduction to the topic, it is flawless.

Recommendations