Skip to content

Commit 97a32b0

Browse files
tolgacangozfacebook-github-bot
authored andcommitted
Assign variables (#1013)
Summary: If USE_PRETRAINED_MODEL == True; then assign variables. Pull Request resolved: #1013 Reviewed By: NarineK Differential Revision: D40435663 Pulled By: vivekmig fbshipit-source-id: a7ccfad9c7e9987503a0fff3daa7ef8013299339
1 parent 35a257c commit 97a32b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tutorials/Titanic_Basic_Interpret.ipynb

+2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@
202202
"if USE_PRETRAINED_MODEL:\n",
203203
" net.load_state_dict(torch.load('models/titanic_model.pt'))\n",
204204
" print(\"Model Loaded!\")\n",
205+
" input_tensor = torch.from_numpy(train_features).type(torch.FloatTensor)\n",
206+
" label_tensor = torch.from_numpy(train_labels)\n",
205207
"else:\n",
206208
" criterion = nn.CrossEntropyLoss()\n",
207209
" num_epochs = 200\n",

0 commit comments

Comments
 (0)