7. Define all of the parameters that are required to train your model. Set the number of epochs to`50`:
...
...
@@ -1492,11 +1492,11 @@
1. Duplicate the notebook from the previous activity.
为了完成此活动,按照以下步骤,除了修改**转换**值之外,不会更改任何代码。
为了完成此活动,按照以下步骤,除了修改`tranforms`值之外,不会更改任何代码。
2. Change the definition of the **transform** variable so that it includes, in addition to normalizing and converting the data into tensors, the following transformations:
4. Create the **inputs** and **targets** variables that will be fed to the network to create the model. These variables should be of the same shape and be converted into PyTorch tensors.
6. Instantiate the **class** function containing the model. Feed the input size, the number of neurons in each recurrent layer (`10`), and the number of recurrent layers (`1`):
7. Determine the number of batches to be created out of your dataset, bearing in mind that each batch should contain 100 sequences, each with a length of 50\. Next, split the encoded data into 100 sequences: