Commit 05df0620 by zhengzifu

Refactor activation processing in verify_activation.py to simplify matrix…

Refactor activation processing in verify_activation.py to simplify matrix multiplication and output. Removed commented-out code for clarity.
parent b962fa72
...@@ -36,9 +36,10 @@ def run(config: CFG): ...@@ -36,9 +36,10 @@ def run(config: CFG):
with open(results_txt, "w") as f: with open(results_txt, "w") as f:
for layer in weights: for layer in weights:
for i in range(8): # for i in range(8):
activation_bit = get_bit(activation, i) # activation_bit = get_bit(activation, 0)
tem = np.matmul(activation_bit, layer.T) tem = np.matmul(activation, layer.T)
# f.write(f"{tem}\n")
for val in tem[0]: for val in tem[0]:
f.write(f"{val} ") f.write(f"{val} ")
f.write("\n") f.write("\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment