0
$\begingroup$

I'm going through a tutorial for tensorflow with keras and at one stage you build the neural network model using the code below.

model = tf.keras.Sequential([
  layers.Embedding(max_features + 1, embedding_dim),
  layers.Dropout(0.2),
  layers.GlobalAveragePooling1D(),
  layers.Dropout(0.2),
  layers.Dense(1)])

I'm aware that there are different kinds of neural networks such as CNNs and RNNs which are better suited for different tasks. However, how do I relate the architecture built here to what kind of model it is?

Also if possible, if I know what type of model I want to build how does that relate to how I build the keras model?

$\endgroup$

1 Answer 1

0
$\begingroup$

Here you have designed a simple ANN architecture. Anyhow if you want to build CNN architecture(Refer https://keras.io/api/layers/convolution_layers/) RNN architecture(Refer https://keras.io/api/layers/recurrent_layers/). My suggestion would be better to have an understanding of compete architecure of any version of NN before you apply.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.