From 51274ee1ae17e8e73a519a73d6e43dbb99d5e830 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 6 Jun 2026 12:49:09 +0200 Subject: [PATCH] [jayRnn] - adjusted params --- JayRnn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/JayRnn.py b/JayRnn.py index c3bb114..58c7fec 100644 --- a/JayRnn.py +++ b/JayRnn.py @@ -27,7 +27,7 @@ from rbm.status import Status TEXT = "Call me Ishmael. Some years ago" # the character sequence to learn (matches diagram example) WIN = 2 # sliding-window width (= N in the diagram) STRIDE = 1 # sliding-window step size -UNITS = 3 +UNITS = 5 H_SIZE = 128 # hidden units per RBM cell NUM_EPOCHS = 1000 NUM_ITERATIONS = 1 @@ -36,7 +36,7 @@ TRAIN_PARAMS = TrainingParams( learning_rate = 0.1, momentum = 0.5, num_epochs = NUM_EPOCHS, - do_rao_blackwell = True, + do_rao_blackwell = False, num_gibbs_samples= 1 ) #WIN=3 @@ -56,8 +56,8 @@ def str2vec(ch_str: str) -> Mat: def to_window(text: str) -> list[str]: result = [] _win = [' ']*UNITS - for ch in text: - for _i in range(WIN-1): + for _i in range(WIN - 1): + for ch in text: _win = _win[1:WIN] + [ch] result += _win