Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cde7fa4

Browse files
author
Susannah Klaneček
committed
Remove hyperparameters cell
1 parent 070464f commit cde7fa4

File tree

1 file changed

+9
-38
lines changed

1 file changed

+9
-38
lines changed

‎3_rnn_text_classification.ipynb‎

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"import nltk\n",
3535
"nltk.download('stopwords')"
3636
],
37-
"execution_count": 1,
37+
"execution_count": 0,
3838
"outputs": [
3939
{
4040
"output_type": "stream",
@@ -107,7 +107,7 @@
107107
"device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n",
108108
"device"
109109
],
110-
"execution_count": 2,
110+
"execution_count": 0,
111111
"outputs": [
112112
{
113113
"output_type": "execute_result",
@@ -133,35 +133,6 @@
133133
"# RNN Text Classification: Predict the sentiment of IMDB movie reviews"
134134
]
135135
},
136-
{
137-
"metadata": {
138-
"colab_type": "text",
139-
"id": "lcDm8cJ6KIgt"
140-
},
141-
"cell_type": "markdown",
142-
"source": [
143-
"## Specify Hyperparameters"
144-
]
145-
},
146-
{
147-
"metadata": {
148-
"colab_type": "code",
149-
"id": "F4z4mY2kKGlq",
150-
"scrolled": true,
151-
"colab": {}
152-
},
153-
"cell_type": "code",
154-
"source": [
155-
"DROPOUT_PROBABILITY = 0.3\n",
156-
"LEARNING_RATE = 1e-3\n",
157-
"N_RNN_LAYERS = 1\n",
158-
"EMBEDDING_DIMENSION = 128\n",
159-
"HIDDEN_SIZE = 64\n",
160-
"IS_BIDIRECTIONAL = True"
161-
],
162-
"execution_count": 0,
163-
"outputs": []
164-
},
165136
{
166137
"metadata": {
167138
"colab_type": "text",
@@ -296,7 +267,7 @@
296267
"\n",
297268
"dataset = ImdbSentimentDataset(DATA_PATH, max_vocab, max_len)"
298269
],
299-
"execution_count": 5,
270+
"execution_count": 0,
300271
"outputs": [
301272
{
302273
"output_type": "stream",
@@ -362,7 +333,7 @@
362333
" dataset, valid_ratio=0.05, test_ratio=0.05)\n",
363334
"len(train_dataset), len(valid_dataset), len(test_dataset)"
364335
],
365-
"execution_count": 7,
336+
"execution_count": 0,
366337
"outputs": [
367338
{
368339
"output_type": "execute_result",
@@ -592,7 +563,7 @@
592563
"model = model.to(device)\n",
593564
"model"
594565
],
595-
"execution_count": 12,
566+
"execution_count": 0,
596567
"outputs": [
597568
{
598569
"output_type": "execute_result",
@@ -748,7 +719,7 @@
748719
" \n",
749720
" n_epochs += 1"
750721
],
751-
"execution_count": 15,
722+
"execution_count": 0,
752723
"outputs": [
753724
{
754725
"output_type": "display_data",
@@ -1339,7 +1310,7 @@
13391310
"plt.xticks(epoch_ticks)\n",
13401311
"plt.show()"
13411312
],
1342-
"execution_count": 16,
1313+
"execution_count": 0,
13431314
"outputs": [
13441315
{
13451316
"output_type": "display_data",
@@ -1409,7 +1380,7 @@
14091380
" \n",
14101381
"print(classification_report(y_true, y_pred))"
14111382
],
1412-
"execution_count": 22,
1383+
"execution_count": 0,
14131384
"outputs": [
14141385
{
14151386
"output_type": "display_data",
@@ -1514,7 +1485,7 @@
15141485
"source": [
15151486
"print_random_prediction(n=5)"
15161487
],
1517-
"execution_count": 23,
1488+
"execution_count": 0,
15181489
"outputs": [
15191490
{
15201491
"output_type": "display_data",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /