Добавление кнопки "домой" и гайда
Build and Push / build (push) Successful in 9s

This commit is contained in:
Dmitry
2026-05-18 15:57:22 +03:00
parent 4c8e7b9762
commit 26f4909ead
4 changed files with 95 additions and 11 deletions
+4 -6
View File
@@ -17,13 +17,11 @@ MAX_MAXNET_ITER = 100
def recall_hamming(pattern_vectors, input_vec)
eps = 0.9 / pattern_vectors.length
outputs = hamming_layer(pattern_vectors, input_vec)
MAX_MAXNET_ITER.times do
next_out = maxnet_step(outputs, eps)
return next_out.each_with_index.max_by { |v, _| v }[1] if next_out.count { |v| v > 1e-9 } <= 1
outputs = next_out
iter = 0
while outputs.count { |v| v > 1e-9 } > 1 && iter < MAX_MAXNET_ITER
outputs = maxnet_step(outputs, eps)
iter += 1
end
outputs.each_with_index.max_by { |v, _| v }[1]
end