refactor RnnModel: multi-unit delay training and unified vc interface

- Add batch_delay() to shift visible input per unit index
- Unify forward_step() to work with combined vc matrix
- Fix split() to always slice on axis=1
- Add index param to Entity for readable naming
- Rename test_xor.py to xor.py, replace Mat with np.array

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 16:29:36 +02:00
co-authored by Claude Sonnet 4.6
parent b20ea4edb6
commit f7ed8563d7
4 changed files with 56 additions and 34 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ def xor():
layer.load(os.path.join(WORK_DIR, "xor_layer0_state.npz"))
# Prepare training data
training_batch = Mat([[0,1,1], [0,0,0], [1,1,0], [1,0,1]], dtype=np.float64)
training_batch = np.array([[0,1,1], [0,0,0], [1,1,0], [1,0,1]], dtype=np.float64)
# Train layer
train(layer.entity, training_batch, Status())