Skip to content

Commit eb8e5bf

Browse files
committed
add counter re-init
1 parent 84be9c7 commit eb8e5bf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

homework04/part1_salary_prediction.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,8 @@
780780
"outputs": [],
781781
"source": [
782782
"print(\"Final eval:\")\n",
783+
"val_loss = val_mae = val_batches = 0\n",
784+
"\n",
783785
"for batch in iterate_minibatches(data_val, shuffle=False):\n",
784786
" title_ix = Variable(torch.LongTensor(batch[\"Title\"]), volatile=True)\n",
785787
" desc_ix = Variable(torch.LongTensor(batch[\"FullDescription\"]), volatile=True)\n",

week10_textconv/Seminar-pytorch.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,8 @@
778778
"outputs": [],
779779
"source": [
780780
"print(\"Final eval:\")\n",
781+
"val_loss = val_mae = val_batches = 0\n",
782+
"\n",
781783
"for batch in iterate_minibatches(data_val, shuffle=False):\n",
782784
" title_ix = Variable(torch.LongTensor(batch[\"Title\"]), volatile=True)\n",
783785
" desc_ix = Variable(torch.LongTensor(batch[\"FullDescription\"]), volatile=True)\n",

0 commit comments

Comments
 (0)