I am building a neural network with keras and tensorfrolw as backend. it has 3 inputs from 0 to 9 and 3 outputs from 0 to 9. The data is served in a numpy array lie this: [ ['1' '4' '0'] ['6' '2' '1'] ...].
I am new to deep learning and this is one of my first neural networks so i am lost and have no idea what is causing this error.
I am aware that i probably need to change the optimizer, loss, metrics and probably more attributes, if anyone has any insights on that please share.
model = keras.Sequential([
keras.layers.Flatten(3, input_shape=(3, 3)),
keras.layers.Dense(9, activation="relu"),
keras.layers.Dense(9, activation="relu"),
keras.layers.Dense(3, activation="relu")
])
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
model.fit(training_input, training_output, epochs=5)
When i run this program i get this error:
Traceback (most recent call last):
File "C:/Users/---/---/---/---/---/---/---/main.py", line 15, in <module>
keras.layers.Flatten(3, input_shape=(3, 3)),
File "C:\Users\---\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\keras\layers\core.py", line 571, in __init__
self.data_format = conv_utils.normalize_data_format(data_format)
File "C:\Users\---\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\keras\utils\conv_utils.py", line 191, in normalize_data_format
data_format = value.lower()
AttributeError: 'int' object has no attribute 'lower' \