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:
@@ -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())
|
||||
Reference in New Issue
Block a user