diff --git a/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb b/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb index ae59e7712cc0..0d9363cd332f 100644 --- a/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb +++ b/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb @@ -1398,7 +1398,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's create two evaluators to compute metrics on train/test images and log them to Tensorboard:" + "Let's create an evaluator to compute metrics on train/test images and log them to Tensorboard:" ] }, { @@ -1423,42 +1423,6 @@ " device=device, non_blocking=True)" ] }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": {}, - "outputs": [], - "source": [ - "from ignite.contrib.handlers import CustomPeriodicEvent\n", - "\n", - "cpe = CustomPeriodicEvent(n_epochs=3)\n", - "cpe.attach(trainer)\n", - "\n", - "\n", - "def run_evaluation(engine):\n", - " train_evaluator.run(eval_train_loader)\n", - " evaluator.run(test_loader)\n", - "\n", - "\n", - "trainer.add_event_handler(cpe.Events.EPOCHS_3_STARTED, run_evaluation)\n", - "trainer.add_event_handler(Events.COMPLETED, run_evaluation)\n", - "\n", - "\n", - "# Log train eval metrics:\n", - "tb_logger.attach(train_evaluator,\n", - " log_handler=OutputHandler(tag=\"training\",\n", - " metric_names=list(metrics.keys()),\n", - " another_engine=trainer),\n", - " event_name=Events.EPOCH_COMPLETED)\n", - "\n", - "# Log val metrics:\n", - "tb_logger.attach(evaluator,\n", - " log_handler=OutputHandler(tag=\"test\",\n", - " metric_names=list(metrics.keys()),\n", - " another_engine=trainer),\n", - " event_name=Events.EPOCH_COMPLETED)" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -1835,9 +1799,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.8.2" } }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}