Skip to content

Commit 3c74357

Browse files
PR #510: Fixing dataset directory path and tensorflow 2.0 fit module
Please approve this CL. It will be submitted automatically, and its GitHub pull request will be marked as merged. Imported from GitHub PR #510 Existing code had a issue for dataset directory and also the current version of tensorflow 2.0 deprecated fit_generator and introduced fit method for the same functionality. Copybara import of the project: - b3ac75f Fixing dataset directory path and tensorflow 2.0 fit modu... by sablevinayak <vinayakraj.sable@gmail.com> - 8af8226 Merge b3ac75f into 16a5a... by Vinayak Sable <vinayakraj.sable@gmail.com> PiperOrigin-RevId: 757085715
1 parent 16a5a66 commit 3c74357

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

courses/udacity_intro_to_tensorflow_for_deep_learning/l05c01_dogs_vs_cats_without_augmentation.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
},
231231
"outputs": [],
232232
"source": [
233-
"base_dir = os.path.join(os.path.dirname(zip_dir), 'cats_and_dogs_filtered')\n",
233+
"base_dir = os.path.join(zip_dir, 'cats_and_dogs_filtered')\n",
234234
"train_dir = os.path.join(base_dir, 'train')\n",
235235
"validation_dir = os.path.join(base_dir, 'validation')\n",
236236
"\n",
@@ -591,7 +591,7 @@
591591
"outputs": [],
592592
"source": [
593593
"EPOCHS = 100\n",
594-
"history = model.fit_generator(\n",
594+
"history = model.fit(\n",
595595
" train_data_gen,\n",
596596
" steps_per_epoch=int(np.ceil(total_train / float(BATCH_SIZE))),\n",
597597
" epochs=EPOCHS,\n",

0 commit comments

Comments
 (0)