[code-reflection] Integrated: Updating the ONNX CNNTest

Adam Pocock duke at openjdk.org
Mon Feb 10 19:43:31 UTC 2025


On Wed, 5 Feb 2025 16:09:36 GMT, Adam Pocock <duke at openjdk.org> wrote:

> - Adds a Python script which trains a small LeNet style CNN on MNIST, exporting it to ONNX format.
> - Updates the CNNTest to match the trained CNN.
> - Added support for loading in the ONNX model, extracting the weights and saving them out in serialized Java records (this adds protobuf-java as a dependency along with the compiled ONNX protobuf).
> 
> The compiled ONNX protobuf is Apache 2.0 licensed, and the Python script is adapted from a PyTorch tutorial which is BSD licensed.

This pull request has now been integrated.

Changeset: adbb7a81
Author:    Adam Pocock <adam.pocock at oracle.com>
Committer: Paul Sandoz <psandoz at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/adbb7a819c52121da58754ba222015422c7a38b5
Stats:     47795 lines in 6 files changed: 47687 ins; 33 del; 75 mod

Updating the ONNX CNNTest

Reviewed-by: psandoz

-------------

PR: https://git.openjdk.org/babylon/pull/307


More information about the babylon-dev mailing list