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.
Why Deep Learning with IBM i?
Section titled “Why Deep Learning with IBM i?”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
Hardware acceleration
Section titled “Hardware acceleration”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 ortimport numpy as npfrom PIL import Image
# Load the exported ONNX model (stored on IFS)session = ort.InferenceSession("/home/myapp/models/invoice_classifier.onnx")
# Preprocess an image from IFSimg = Image.open("/home/myapp/docs/invoice_001.png").resize((224, 224))input_data = np.array(img).transpose(2, 0, 1).astype(np.float32) / 255.0input_data = np.expand_dims(input_data, axis=0)
# Run inferenceoutputs = 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”| Platform | Training | Inference on IBM i | Notes |
|---|---|---|---|
| Python Ecosystem for IBM Power | ✅ | Via REST API | PyTorch, TensorFlow available |
| watsonx.ai | ✅ | Via REST API | Managed training and deployment |
| Red Hat OpenShift AI | ✅ | Via REST API | On-prem or cloud |
| Wallaroo | ✅ | Via REST API | MMA-optimized inference |
| IBM i PASE (scikit-learn) | ✅ | ✅ | outdated version |
| Equitus Video Sentinel | ✅ | Via REST API | Video/image recognition, external system on Power |