Exercise

# Comparing the number of parameter of RNN and ANN

In this exercise, you will compare the number of parameters of an artificial neural network (ANN) with the recurrent neural network (RNN) architectures. Here, the vocabulary size is equal to `10,000`

for both models.

The models have been defined for you with similar architectures of only one layer with `256`

units (Dense or RNN) plus the output layer. They are stored on variables `ann_model`

and `rnn_model`

.

Use the method `.summary()`

to print the models' architecture and number of parameters and select the correct statement.

Instructions

**50 XP**

##### Possible Answers

- The ANN model has more parameters on the second
`Dense`

layer than the RNN model. - The RNN model has fewer parameters than the ANN model.
- The RNN model needs to train approximately the same number of parameters as the ANN model.
- The one-hot encoding allows the RNN model to have fewer parameters.