Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing inEnroll Now
Now that we have preprocessed and created the dataset, we can create the model:
keras.layers.Embedding: Turns positive integers (indexes) into dense vectors of fixed size. More here.
keras.layers.GRU: The GRU(Gated Recurrent Unit) Layer.
128, which is the embedding size of each word.
embed_size = 128
Create the model
GRU layer with 4 units
GRU layer with 2 units
Dense layer with 1 unit and
model = keras.models.Sequential([ keras.layers.Embedding(vocab_size + num_oov_buckets, embed_size, mask_zero=True, input_shape=[None]), keras.layers.GRU(4, return_sequences=True), keras.layers.GRU(2), keras.layers.Dense(1, activation="sigmoid") ])
Compile the model with
"binary_crossentropy" loss(as this is a binary classification problem),
"adam" optimizer and
model.compile(loss="binary_crossentropy", optimizer="adam", metrics=["accuracy"])
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here