Skip to content

End-to-end training

This section introduces the End-to-End learning architecture and how to execute each component using command-line instructions.

OpenDPDv2 end-to-end learning architecture

The E2E learning framework consists of three main components:

1. Data Acquisition & Pre-Processing: This phase involves collecting and preprocessing baseband I/Q signals from the Power Amplifier (PA). To reduce gradient vanishing and enhance training effectiveness, we segment the raw data into shorter frames. The dataset includes signal measurements at various bandwidths from a digital transmitter. Data is partitioned in an 8:2:2 ratio for training, testing, and validation.

2. PA Modeling: This step trains a behavioral model of the PA using framed input and target output pairs through sequence-to-sequence learning. We employ Backpropagation Through Time (BPTT) for optimization.

Command line for PA modeling (use --accelerator cuda for NVIDIA GPU acceleration or --accelerator mps for Apple Silicon GPU acceleration):

python main.py --dataset_name DPA_200MHz --step train_pa --accelerator cpu

3. DPD Learning: Here, we integrate a Digital Pre-Distortion (DPD) model before the pre-trained PA behavioral model. The input signal feeds into the cascaded model, and through BPTT, we align the output signal with the amplified linear input signal. In OpenDPDv2, we add the deltarnn backbones for temporally-sparse DPD learning.

Command line for DPD learning:

python main.py --dataset_name DPA_200MHz --step train_dpd --accelerator cpu
4. Quantization-Aware Learning: Quantization-Aware is a technique for training fixed-point quantized DPD models without significantly compromising accuracy, enabling efficient hardware implementation.

# 16-bit Quantization example
# The quantized model is fine-tuned from a float DPD of the same backbone: train it first with
# `--step train_dpd --DPD_backbone qgru` and pass its checkpoint (save/.../DPD_*_M_QGRU_*.pt) as ${pretrained_model_from_previous_step}
# Replace ${label_for_quantized_model} with your desired label for the quantized model
python main.py --dataset_name DPA_200MHz --step train_dpd --accelerator cpu --DPD_backbone qgru --quant --n_bits_w 16 --n_bits_a 16 --pretrained_model ${pretrained_model_from_previous_step} --quant_dir_label ${label_for_quantized_model}

5. Validation Experiment: To assess the DPD model's performance, we generate an ideal input signal after training. The resulting signal is stored in CSV format in the run_dpd directory.

Command line for validation:

python main.py --dataset_name DPA_200MHz --step run_dpd --accelerator cpu
Command line for validation with quantization:
# Ensure ${label_for_quantized_model} matches what you used in step 4
python main.py --dataset_name DPA_200MHz --step run_dpd --accelerator cpu --DPD_backbone qgru --quant --n_bits_w 16 --n_bits_a 16 --quant_dir_label ${label_for_quantized_model}

Enhanced Visualization with Rich Tables

OpenDPD features advanced progress visualization using Rich tables, displaying training metrics in an organized, colorful format:

  • Left table: General information about the training run
  • Right table: Training, validation, and test metrics with consistent formatting

You can adjust the decimal precision for metric display using the --log_precision parameter:

python main.py --dataset_name DPA_200MHz --step train_pa --log_precision 4