diff options
Diffstat (limited to 'res/TensorFlowPythonExamples/examples/RNN_GRUCell_unroll/__init__.py')
-rw-r--r-- | res/TensorFlowPythonExamples/examples/RNN_GRUCell_unroll/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/res/TensorFlowPythonExamples/examples/RNN_GRUCell_unroll/__init__.py b/res/TensorFlowPythonExamples/examples/RNN_GRUCell_unroll/__init__.py new file mode 100644 index 000000000..f2d503693 --- /dev/null +++ b/res/TensorFlowPythonExamples/examples/RNN_GRUCell_unroll/__init__.py @@ -0,0 +1,9 @@ +# NOTE tested with TF 2.8.0 +from tensorflow import keras + +model = keras.Sequential() +shape = (4, 4) + +model.add(keras.layers.InputLayer(input_shape=shape, batch_size=1)) +grucell = keras.layers.GRUCell(2) +model.add(keras.layers.RNN(grucell, input_shape=shape, unroll=True)) |