diff --git a/README.md b/README.md index a5f6636c3a05912e91cdb21b207288ca7b57a6e6..f7cdf634305056a5689f7739fffe913bf5f5aba0 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ PaddleHub以预训练模型应用为核心具备以下特点: ### 安装命令 -PaddlePaddle框架的安装请查阅[飞桨快速安装](https://www.paddlepaddle.org.cn/install/quick) +在安装paddlehub之前,请先安装PaddlePaddle深度学习框架。 +PaddlePaddle深度学习框架的安装请查阅[飞桨快速安装](https://www.paddlepaddle.org.cn/install/quick) ```shell pip install paddlehub diff --git a/paddlehub/autodl/DELTA/README.md b/autodl/DELTA/README.md similarity index 84% rename from paddlehub/autodl/DELTA/README.md rename to autodl/DELTA/README.md index 7b235d46f085ba05aa41ab0dabd9317b3efd09da..8620bb0dec9c0fad617abe6537f5ac93c7c503b8 100644 --- a/paddlehub/autodl/DELTA/README.md +++ b/autodl/DELTA/README.md @@ -1,10 +1,12 @@ +# DELTA: DEep Learning Transfer using Feature Map with Attention for Convolutional Networks -# Introduction -This page implements the [DELTA](https://arxiv.org/abs/1901.09229) algorithm in [PaddlePaddle](https://www.paddlepaddle.org.cn/install/quick). +## Introduction + +This page implements the [DELTA](https://arxiv.org/abs/1901.09229) algorithm in [PaddlePaddle](https://www.paddlepaddle.org.cn). > Li, Xingjian, et al. "DELTA: Deep learning transfer using feature map with attention for convolutional networks." ICLR 2019. -# Preparation of Data and Pre-trained Model +## Preparation of Data and Pre-trained Model - Download transfer learning target datasets, like [Caltech-256](http://www.vision.caltech.edu/Image_Datasets/Caltech256/), [CUB_200_2011](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html) or others. Arrange the dataset in this way: ``` @@ -23,7 +25,7 @@ This page implements the [DELTA](https://arxiv.org/abs/1901.09229) algorithm in - Download [the pretrained models](https://github.com/PaddlePaddle/models/tree/release/1.7/PaddleCV/image_classification#resnet-series). We give the results of ResNet-101 below. -# Running Scripts +## Running Scripts Modify `global_data_path` in `datasets/data_path` to the path root where the dataset is. diff --git a/paddlehub/autodl/DELTA/args.py b/autodl/DELTA/args.py similarity index 100% rename from paddlehub/autodl/DELTA/args.py rename to autodl/DELTA/args.py diff --git a/paddlehub/autodl/DELTA/datasets/data_path.py b/autodl/DELTA/datasets/data_path.py similarity index 100% rename from paddlehub/autodl/DELTA/datasets/data_path.py rename to autodl/DELTA/datasets/data_path.py diff --git a/paddlehub/autodl/DELTA/datasets/readers.py b/autodl/DELTA/datasets/readers.py similarity index 100% rename from paddlehub/autodl/DELTA/datasets/readers.py rename to autodl/DELTA/datasets/readers.py diff --git a/paddlehub/autodl/DELTA/main.py b/autodl/DELTA/main.py similarity index 100% rename from paddlehub/autodl/DELTA/main.py rename to autodl/DELTA/main.py diff --git a/paddlehub/autodl/DELTA/models/__init__.py b/autodl/DELTA/models/__init__.py similarity index 100% rename from paddlehub/autodl/DELTA/models/__init__.py rename to autodl/DELTA/models/__init__.py diff --git a/paddlehub/autodl/DELTA/models/resnet.py b/autodl/DELTA/models/resnet.py similarity index 100% rename from paddlehub/autodl/DELTA/models/resnet.py rename to autodl/DELTA/models/resnet.py diff --git a/paddlehub/autodl/DELTA/models/resnet_vc.py b/autodl/DELTA/models/resnet_vc.py similarity index 100% rename from paddlehub/autodl/DELTA/models/resnet_vc.py rename to autodl/DELTA/models/resnet_vc.py diff --git a/paddlehub/finetune/task/base_task.py b/paddlehub/finetune/task/base_task.py index 10d2de74c262d9d5221c389f0afffe49de74c9ad..0a118c82f1d55a61823273aea31c9556cb016e2e 100644 --- a/paddlehub/finetune/task/base_task.py +++ b/paddlehub/finetune/task/base_task.py @@ -832,7 +832,9 @@ class BaseTask(object): self.config.checkpoint_dir, self.exe, main_program=self.main_program) - + # Revise max_train_steps when incremental training + self.max_train_steps = self.env.current_step + self.max_train_steps / self.config.num_epoch * ( + self.config.num_epoch - self.env.current_epoch + 1) return is_load_successful def load_parameters(self, dirname):