Skip to content

Commit

Permalink
more improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Feb 24, 2017
1 parent 2f0dc81 commit 06640df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions labs/04_conv_nets_2/classif_and_loc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"import numpy as np\n",
"import xml.etree.ElementTree as etree\n",
"import os\n",
"import os.path as op\n",
"\n",
"# Parse the xml annotation file and retrieve the path to each image,\n",
"# its size and annotations\n",
Expand Down Expand Up @@ -246,8 +247,7 @@
" 'when both img_size and crop_size are None, all images '\n",
" 'in image_paths must have the same shapes.')\n",
"\n",
" batch = preprocess_input(img_batch)\n",
" return model.predict(img_batch)"
" return model.predict(preprocess_input(img_batch))"
]
},
{
Expand Down Expand Up @@ -916,7 +916,7 @@
"\n",
"history = model.fit(inputs, y=[out_cls, out_boxes], \n",
" validation_data=(test_inputs, [test_cls, test_boxes]), \n",
" batch_size=batch_size, nb_epoch=10)"
" batch_size=batch_size, nb_epoch=10, verbose=2)"
]
},
{
Expand Down Expand Up @@ -986,7 +986,7 @@
"\n",
"history = model.fit(x = inputs, y=[out_cls, out_boxes], \n",
" validation_data=(test_inputs, [test_cls, test_boxes]), \n",
" batch_size=batch_size, nb_epoch=30)\n",
" batch_size=batch_size, nb_epoch=30, verbose=2)\n",
"\n",
"compute_acc(train=True)\n",
"compute_acc(train=False)"
Expand Down
2 changes: 1 addition & 1 deletion labs/04_conv_nets_2/solutions/classif_and_loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def classif_and_loc(num_classes):

history = model.fit(x = inputs, y=[out_cls, out_boxes],
validation_data=(test_inputs, [test_cls, test_boxes]),
batch_size=batch_size, nb_epoch=30)
batch_size=batch_size, nb_epoch=30, verbose=2)

compute_acc(train=True)
compute_acc(train=False)

0 comments on commit 06640df

Please sign in to comment.