neuro-lab2/nn9-elman.py
2025-10-04 21:03:58 +03:00

20 lines
428 B
Python

import tensorflow as tf
import tensorflow.keras.layers as l
import generic as g
m = tf.keras.models.Sequential([
l.Input(shape = (2, 1)),
l.SimpleRNN(1000, activation = "relu"),
l.Dense(1)
])
#i = l.Input(shape = (2,))
#h1 = l.SimpleRNN(10, activation = "relu", input_shape = (2, 1))(i)
#o = l.Dense(1)(h1)
#m = tf.keras.models.Model(inputs = i, outputs = o)
#g.train_generic(m, "r2")
g.verify_generic(m, "r2")