吴恩达深度学习学习笔记——C5W1——循环序列模型(RNN)——练习题

C5W1 Quiz - Recurrent Neural Networks

20230626 updated:

 

 

Ans: A

Ans: A

Ans: B、D

4.

Ans: C

Ans: D

Ans: B

Ans: D

Ans: C

Ans: A

Ans: C

1. Suppose your training examples are sentences (sequences of words). Which of the following refers to the j^{th}jth word in the i^{th}ith training example?

Ans: x(i)<j>

2. Consider this RNN: This specific type of architecture is appropriate when:

Ans: T_x = T_y

3. To which of these tasks would you apply a many-to-one RNN architecture? (Check all that apply).

Ans: Sentiment classification (input a piece of text and output a 0/1 to denote positive or negative sentiment)

         Gender recognition from speech (input an audio clip and output a label indicating the speaker’s gender)

4. You are training this RNN language model. At the t^{th} time step, what is the RNN doing? Choose the best answer.

Ans: Estimating P(y^{<t>} | y^{<1>}, y^{<2>}, …, y^{<t-1>})

5. You have finished training a language model RNN and are using it to sample random sentences, as follows:

What are you doing at each time step t?

Ans: (i) Use the probabilities output by the RNN to randomly sample a chosen word for that time-step as {y}^{<t>}. (ii) Then pass this selected word to the next time-step.

6. You are training an RNN, and find that your weights and activations are all taking on the value of NaN (“Not a Number”). Which of these is the most likely cause of this problem?

Ans: Exploding gradient problem.

7. Suppose you are training a LSTM. You have a 10000 word vocabulary,  and are using an LSTM with 100-dimensional activations a^{<t>}. What is the dimension of Γu at each time step?

Ans: 10000

8. Here’re the update equations for the GRU.

Ans: Betty’s model (removing Γr), because if Γu ≈ 0 for a timestep, the gradient can propagate back through that timestep without much decay.

9. Here are the equations for the GRU and the LSTM: From these, we can see that the Update Gate and Forget Gate in the LSTM play a role similar to _______ and ______ in the GRU. What should go in the the blanks?

Ans: Γu and 1-Γu

​        

10. You have a pet dog whose mood is heavily dependent on the current and past few days’ weather. You’ve collected data for the past 365 days on the weather, which you represent as a sequence as x^{<1>}, …, x^{<365>}. You’ve also collected data on your dog’s mood, which you represent as y^{<1>}, …, y^{<365>}. You’d like to build a model to map from x→y. Should you use a Unidirectional RNN or Bidirectional RNN for this problem?

Ans: Unidirectional RNN, because the value of y^{<t>} depends only on x^{<1>}, …, x^{<t>}, but not on x^{<t+1>}, …, x^{<365>}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值