I have a situation where I'd like a DNN to learn the [unknown] mapping between two fixed-length strings. A [simplistic] example:
"-+--++-++-" -> "968" "+-+-+-+-+-" -> "185" "-+-+-+++--" -> "766"
I can normalize the characters in the input string to convert them into the numerical inputs required by the DNN but I'm not sure how to structure the output layer (I'm using Keras).
Assuming the output string is 3 characters long:
model = models.Sequential() model.add(layers.Dense(x1, activation='relu', input_shape=(N,))) model.add(layers.Dense(x2, activation='relu')) ... model.add(layers.Dense(3, activation='???'))
- I'll need a way to convert the 3 outputs back into characters.
- I can't seem to figure out which activation function I should use.
- I'll also need to choose appropriate optimizer and loss functions