| 
									
										
										
										
											2021-05-05 10:13:49 -07:00
										 |  |  | --- | 
					
						
							|  |  |  | id: 5e8f2f13c4cdbe86b5c72da0 | 
					
						
							| 
									
										
										
										
											2021-07-16 11:03:16 +05:30
										 |  |  | title: '使用 RNN 進行自然語言處理:創建戲劇生成器' | 
					
						
							| 
									
										
										
										
											2021-05-05 10:13:49 -07:00
										 |  |  | challengeType: 11 | 
					
						
							|  |  |  | videoId: j5xsxjq_Xk8 | 
					
						
							| 
									
										
										
										
											2021-10-03 12:24:27 -07:00
										 |  |  | bilibiliIds: | 
					
						
							|  |  |  |   aid: 720525759 | 
					
						
							|  |  |  |   bvid: BV1xQ4y1r7tw | 
					
						
							|  |  |  |   cid: 409137674 | 
					
						
							| 
									
										
										
										
											2021-05-05 10:13:49 -07:00
										 |  |  | dashedName: natural-language-processing-with-rnns-create-a-play-generator | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # --question--
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## --text--
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-16 11:03:16 +05:30
										 |  |  | 填寫下面的空白以創建 RNN 的訓練示例: | 
					
						
							| 
									
										
										
										
											2021-05-05 10:13:49 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | ```py | 
					
						
							|  |  |  | char_dataset = tf.data.__A__.__B__(text_as_int) | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## --answers--
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-16 11:03:16 +05:30
										 |  |  | A: `Dataset` | 
					
						
							| 
									
										
										
										
											2021-05-05 10:13:49 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | B: `from_tensor_slices` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | A: `data` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | B: `from_tensors` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | A: `DataSet` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | B: `from_generator` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## --video-solution--
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 1 | 
					
						
							|  |  |  | 
 |