Skip to content

Commit 5496f49

Browse files
Karadaryaipozdnov
authored andcommitted
edited tutorial
1 parent 72a7fbd commit 5496f49

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

examples/tutorial_emnist_tflm/conversion_tutorial/model_conversion.ipynb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,22 @@
300300
"interpreter.allocate_tensors()"
301301
]
302302
},
303+
{
304+
"cell_type": "markdown",
305+
"metadata": {},
306+
"source": [
307+
"Full test set contains 20800 samples. Evaluating int8 model on it might take more than 10 minutes. If you want to get estimation faster, please, limit number of samples to be evaluated by reducing **max_samples** value"
308+
]
309+
},
310+
{
311+
"cell_type": "code",
312+
"execution_count": null,
313+
"metadata": {},
314+
"outputs": [],
315+
"source": [
316+
"max_samples = 20800"
317+
]
318+
},
303319
{
304320
"cell_type": "code",
305321
"execution_count": null,
@@ -314,7 +330,7 @@
314330
"\n",
315331
" prediction_values = []\n",
316332
" \n",
317-
" for test_image in preprocessed_test_images:\n",
333+
" for test_image in preprocessed_test_images[:max_samples]:\n",
318334
" # Pre-processing: add batch dimension, quantize and convert inputs to int8 to match with\n",
319335
" # the model's input data format.\n",
320336
" test_image = np.expand_dims(test_image, axis=0) #.astype(np.float32)\n",
@@ -451,7 +467,7 @@
451467
"* copy *generated/model.h* and *generated/test_samples.cc* to *../src*\n",
452468
"* open top folder of this tutorial (*tutorial_emnist_tflm*) in terminal and build and run application:\n",
453469
"```\n",
454-
"make app run\n",
470+
"gmake app run\n",
455471
"```"
456472
]
457473
}

examples/tutorial_emnist_tflm/src/test_samples.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,4 +1163,4 @@ TestSample sample25 = {
11631163
const TestSample test_samples[kNumSamples] = {sample1, sample2, sample3, sample4,
11641164
sample5, sample6, sample7, sample8, sample9, sample10, sample11, sample12,
11651165
sample13, sample14, sample15, sample16, sample17, sample18, sample19, sample20,
1166-
sample21, sample22, sample23, sample24, sample25, };
1166+
sample21, sample22, sample23, sample24, sample25 };

0 commit comments

Comments
 (0)