Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Idan-BenAmi committed Nov 12, 2023
1 parent c8ec6c6 commit 1df1636
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tutorials/notebooks/example_keras_nanodet_plus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
"outputs": [],
"source": [
"import model_compression_toolkit as mct\n",
"from typing import Iterator, Tuple\n",
"\n",
"REPRESENTATIVE_DATASET_FOLDER = '/content/coco/val2017'\n",
"REPRESENTATIVE_DATASET_ANNOTATION_FILE = '/content/coco/annotations/instances_val2017.json'\n",
Expand All @@ -278,9 +279,9 @@
" batch_size=BATCH_SIZE)\n",
"\n",
"# Define representative dataset generator\n",
"def get_representative_dataset(n_iter, train_loader):\n",
"\n",
" def representative_dataset():\n",
"def get_representative_dataset(n_iter: int, dataset_loader: Iterator[Tuple]):\n",
" \n",
" def representative_dataset() -> Iterator[List]:\n",
" ds_iter = iter(train_loader)\n",
" for _ in range(n_iter):\n",
" yield [next(ds_iter)[0]]\n",
Expand Down

0 comments on commit 1df1636

Please sign in to comment.