Skip to content

Deep Learning

Deep learning is a subset of machine learning that uses multi-layer neural networks to learn representations from data. Unlike classical ML which relies on hand-engineered features, deep learning models learn features automatically — making them powerful for unstructured data like images, audio, text, and time-series signals.

IBM i environments often sit at the center of business operations that generate or interact with data types where deep learning excels:

  • Document processing — Invoices, purchase orders, and forms scanned to IFS can be processed with convolutional neural networks (CNNs) or transformer-based OCR models
  • Video and image recognition — Camera feeds and image assets can be analyzed for defect detection, access control, or operational monitoring using CNNs and vision transformers (see Equitus Video Sentinel)
  • Time-series forecasting — LSTM and Transformer architectures can model complex temporal patterns in production, sales, or sensor data stored in Db2 for i
  • Natural language processing — Text from customer service records, notes fields, or emails can be classified or summarized with pre-trained language models
  • Anomaly detection at scale — Autoencoders can detect subtle anomalies in high-dimensional operational data that classical ML models miss

How deep learning fits into the IBM i ecosystem

Section titled “How deep learning fits into the IBM i ecosystem”

Deep learning training is computationally intensive and typically happens off IBM i — on a GPU cluster, a cloud AI platform like watsonx.ai, or an on-premises server equipped with accelerators. IBM i most commonly acts as the data source and the consumer of inference results, but deep learning systems can also operate entirely outside of IBM i, integrating through REST APIs.

Common integration patterns include:

  • IBM i self-contained — Models are trained and executed in PASE on IBM i
  • IBM i as data source + inference consumer — Extract data from Db2 for i, train elsewhere, deploy inference on IBM i (Python PASE) or via REST, and surface results back to RPG or Db2 if needed.
  • External deep learning system integrated via REST API — The model trains and runs on a separate platform; IBM i calls it via HTTP to get predictions (e.g., Equitus Video Sentinel)
  • Fully managed cloud platform — IBM i integrates with a hosted AI service; results are returned over a standard API with no inference infrastructure to manage

IBM Power’s Matrix Math Accelerator (MMA) significantly accelerates INT8 and bfloat16 matrix operations — the core computation in neural network inference. This means that even without a GPU, IBM Power can run deep learning inference efficiently for many production use cases. This hardware acceleration capability was added in Power 10 and enhanced in Power 11. See MMA for more information.

For higher-throughput inference workloads, the IBM Spyre Accelerator is designed specifically for LLM and deep learning inference on Power, offering GPU-class throughput with enterprise reliability.

Example: image classification with ONNX Runtime

Section titled “Example: image classification with ONNX Runtime”

After training a model elsewhere and exporting to ONNX:

import onnxruntime as ort
import numpy as np
from PIL import Image
# Load the exported ONNX model (stored on IFS)
session = ort.InferenceSession("/home/myapp/models/invoice_classifier.onnx")
# Preprocess an image from IFS
img = Image.open("/home/myapp/docs/invoice_001.png").resize((224, 224))
input_data = np.array(img).transpose(2, 0, 1).astype(np.float32) / 255.0
input_data = np.expand_dims(input_data, axis=0)
# Run inference
outputs = session.run(None, {"input": input_data})
predicted_class = np.argmax(outputs[0])
print(f"Document type: {predicted_class}")

ONNX Runtime is available as a Python package installable via pip on some platforms. On IBM Power, it is best to use the Python Ecosystem for Power

Platforms for deep learning with IBM i data

Section titled “Platforms for deep learning with IBM i data”
PlatformTrainingInference on IBM iNotes
Python Ecosystem for IBM PowerVia REST APIPyTorch, TensorFlow available
watsonx.aiVia REST APIManaged training and deployment
Red Hat OpenShift AIVia REST APIOn-prem or cloud
WallarooVia REST APIMMA-optimized inference
IBM i PASE (scikit-learn)outdated version
Equitus Video SentinelVia REST APIVideo/image recognition, external system on Power