diff --git a/CHANGELOG.md b/CHANGELOG.md index bca6b2abb..5c51537a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ Most recent releases are shown at the top. Each release shows: - **Changed**: Additional parameters, changes to inputs or outputs, etc - **Fixed**: Bug fixes that don't change documented behaviour +## 0.2.1 (2019-08-15) + +### New: +- N/A + +### Changed: +- N/A + +### Fixed: +- Fixed error related to validation_steps=None in call to fit_generator in ```ktrain.core``` on Google Colab + + ## 0.2.0 (2019-08-12) ### New: diff --git a/examples/vision/pets-ResNet50.ipynb b/examples/vision/pets-ResNet50.ipynb index 8af178c42..abeb53902 100644 --- a/examples/vision/pets-ResNet50.ipynb +++ b/examples/vision/pets-ResNet50.ipynb @@ -20,8 +20,6 @@ "import os\n", "os.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\";\n", "os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\" \n", - "import sys\n", - "sys.path.append('..')\n", "import ktrain\n", "from ktrain import vision as vis" ] diff --git a/ktrain/core.py b/ktrain/core.py index 9778c30ec..3f04eb9b2 100644 --- a/ktrain/core.py +++ b/ktrain/core.py @@ -1040,6 +1040,9 @@ def fit(self, lr, n_cycles, cycle_len=None, cycle_mult=1, # handle callbacks num_samples = U.nsamples_from_data(self.train_data) steps_per_epoch = num_samples // self.train_data.batch_size + validation_steps = None + if self.val_data is not None: + validation_steps = U.nsamples_from_data(self.val_data)//self.val_data.batch_size epochs = self._check_cycles(n_cycles, cycle_len, cycle_mult) self.set_lr(lr) @@ -1066,6 +1069,7 @@ def fit(self, lr, n_cycles, cycle_len=None, cycle_mult=1, warnings.filterwarnings('ignore', message='.*Check your callbacks.*') hist = self.model.fit_generator(self.train_data, steps_per_epoch = steps_per_epoch, + validation_steps = validation_steps, epochs=epochs, validation_data=self.val_data, workers=self.workers, diff --git a/ktrain/version.py b/ktrain/version.py index fb0e94bc1..38d34e958 100644 --- a/ktrain/version.py +++ b/ktrain/version.py @@ -1,2 +1,2 @@ __all__ = ['__version__'] -__version__ = '0.2.0' +__version__ = '0.2.1'