From 3c59c64f87798c7c08c5a7f4f74a5e706d4f740c Mon Sep 17 00:00:00 2001 From: Capek System Safety & Robotic Solutions <96583804+MelkorBalrog@users.noreply.github.com> Date: Sun, 3 Aug 2025 12:29:47 -0400 Subject: [PATCH] style: switch to hash comments in asm --- asm/classification.asm | 15 ++++++++------- asm/training.asm | 7 ++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/asm/classification.asm b/asm/classification.asm index 5197c1b..2aeb830 100644 --- a/asm/classification.asm +++ b/asm/classification.asm @@ -1,4 +1,4 @@ -; (A) Define the 4 Principal ANNs with Transformer Layers +# (A) Define the 4 Principal ANNs with Transformer Layers OP_NEUR CONFIG_ANN 0 CREATE_LAYER 784 2352 LEAKYRELU OP_NEUR CONFIG_ANN 0 SET_SHAPE 28 28 1 OP_NEUR CONFIG_ANN 0 ADD_LAYER 2352 TRANSFORMER @@ -23,16 +23,16 @@ OP_NEUR CONFIG_ANN 2 ADD_LAYER 256 LEAKYRELU OP_NEUR CONFIG_ANN 2 ADD_LAYER 9256 COMBINED_STEP OP_NEUR CONFIG_ANN 2 ADD_LAYER 3 NONE OP_NEUR CONFIG_ANN 2 FINALIZE -; (B) Load All Trained Weights for Classification +# (B) Load All Trained Weights for Classification OP_NEUR LOAD_ALL trained_weights -; (C) Perform Inference on the 4 Principal ANNs +# (C) Perform Inference on the 4 Principal ANNs OP_NEUR INFER_ANN 0 true 10 ADD $t0, $zero, $t9 OP_NEUR INFER_ANN 1 true 10 ADD $t1, $zero, $t9 OP_NEUR INFER_ANN 2 true 10 ADD $t2, $zero, $t9 -; (D) Manual Majority Voting Among the 4 ANNs +# (D) Manual Majority Voting Among the 4 ANNs ADDI $t10, $zero, 0 ADDI $t11, $zero, 0 ADDI $t12, $zero, 0 @@ -78,7 +78,7 @@ ann2_isU: ADDI $t12, $t12, 1 J ann2_done ann2_done: -; (E) Decide Final Class based on Majority Vote +# (E) Decide Final Class based on Majority Vote BGT $t10, $t11, checkA_vsU BGT $t11, $t10, checkB_vsU ADDI $t9, $zero, 2 @@ -92,9 +92,10 @@ BGT $t11, $t12, finalizeB ADDI $t9, $zero, 2 J finalize_output finalizeA: -ADDI $t9, $zero, 0 +ADDI $t9, $zero, 0 # Class A selected – display a green indicator J finalize_output finalizeB: -ADDI $t9, $zero, 1 +ADDI $t9, $zero, 1 # Class B selected – no green indicator finalize_output: +# Final result is in $t9. Use green color when class A is predicted. HALT diff --git a/asm/training.asm b/asm/training.asm index 311100d..308b592 100644 --- a/asm/training.asm +++ b/asm/training.asm @@ -1,4 +1,4 @@ -; (A) Define the 4 Principal ANNs with Transformer Layers +# (A) Define the 4 Principal ANNs with Transformer Layers OP_NEUR CONFIG_ANN 0 CREATE_LAYER 784 2352 LEAKYRELU OP_NEUR CONFIG_ANN 0 SET_SHAPE 28 28 1 OP_NEUR CONFIG_ANN 0 ADD_LAYER 2352 TRANSFORMER @@ -23,10 +23,11 @@ OP_NEUR CONFIG_ANN 2 ADD_LAYER 256 LEAKYRELU OP_NEUR CONFIG_ANN 2 ADD_LAYER 9256 COMBINED_STEP OP_NEUR CONFIG_ANN 2 ADD_LAYER 3 NONE OP_NEUR CONFIG_ANN 2 FINALIZE -; (B) Train Principal ANNs +# (B) Train Principal ANNs OP_NEUR TRAIN_ANN 0 40 10 OP_NEUR TRAIN_ANN 1 40 10 OP_NEUR TRAIN_ANN 2 40 10 -; (C) Save all weights +# (C) Save all weights OP_NEUR SAVE_ALL trained_weights +# Training complete – display a green indicator to confirm success HALT