提交 32ff186b 编写于 作者: W wuzewu

fix reference bug

上级 44aa7b51
......@@ -15,7 +15,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.arg_helper import add_argument, print_arguments
from paddle_hub.common.arg_helper import add_argument, print_arguments
import argparse
ENTRY = "hub"
......
......@@ -15,11 +15,11 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.tools import utils
from paddle_hub.tools.downloader import default_downloader
from paddle_hub.hub_server import default_hub_server
from paddle_hub.common import utils
from paddle_hub.common.downloader import default_downloader
from paddle_hub.common.hub_server import default_hub_server
import argparse
......
......@@ -15,7 +15,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand
from paddle_hub.commands import show
from paddle_hub.commands import help
......
......@@ -17,9 +17,9 @@ from __future__ import print_function
import argparse
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.tools import utils
from paddle_hub.common import utils
from paddle_hub.module.manager import default_module_manager
......
......@@ -16,10 +16,10 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand
from paddle_hub.tools import utils
from paddle_hub.tools.downloader import default_downloader
from paddle_hub.common import utils
from paddle_hub.common.downloader import default_downloader
from paddle_hub.module.manager import default_module_manager
......
......@@ -16,12 +16,12 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.io.reader import csv_reader, yaml_reader
from paddle_hub.module.manager import default_module_manager
from paddle_hub.tools import utils
from paddle_hub.tools.arg_helper import add_argument, print_arguments
from paddle_hub.common import utils
from paddle_hub.common.arg_helper import add_argument, print_arguments
import paddle_hub as hub
import argparse
......
......@@ -15,10 +15,10 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.tools import utils
from paddle_hub.hub_server import default_hub_server
from paddle_hub.common import utils
from paddle_hub.common.hub_server import default_hub_server
import argparse
......
......@@ -19,7 +19,7 @@ from __future__ import print_function
import os
import argparse
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.module.manager import default_module_manager
from paddle_hub.module.module import Module
......
......@@ -18,9 +18,9 @@ from __future__ import print_function
import argparse
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand, ENTRY
from paddle_hub.tools import utils
from paddle_hub.common import utils
from paddle_hub.module.manager import default_module_manager
......
......@@ -16,7 +16,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from paddle_hub.tools.logger import logger
from paddle_hub.common.logger import logger
from paddle_hub.commands.base_command import BaseCommand
from paddle_hub import version
......
......@@ -19,7 +19,7 @@ from __future__ import print_function
import os
import paddle_hub as hub
from paddle_hub.tools.downloader import default_downloader
from paddle_hub.common.downloader import default_downloader
class ImageClassificationDataset:
......
......@@ -25,7 +25,7 @@ from paddle_hub.dataset.base_cv_dataset import ImageClassificationDataset
class DogCatDataset(ImageClassificationDataset):
def __init__(self):
super(DogCatDataset, self).__init__()
dataset_path = os.path.join(hub.dir.DATA_HOME, "dog-cat")
dataset_path = os.path.join(hub.common.dir.DATA_HOME, "dog-cat")
self.base_path = self._download_dataset(
dataset_path=dataset_path,
url="https://paddlehub-dataset.bj.bcebos.com/dog-cat.tar.gz")
......
......@@ -25,7 +25,7 @@ from paddle_hub.dataset.base_cv_dataset import ImageClassificationDataset
class FlowersDataset(ImageClassificationDataset):
def __init__(self):
super(FlowersDataset, self).__init__()
dataset_path = os.path.join(hub.dir.DATA_HOME, "flower_photos")
dataset_path = os.path.join(hub.common.dir.DATA_HOME, "flower_photos")
self.base_path = self._download_dataset(
dataset_path=dataset_path,
url="https://paddlehub-dataset.bj.bcebos.com/flower_photos.tar.gz")
......
......@@ -102,5 +102,5 @@ class FinetuneConfig(object):
return self._enable_memory_optim
@property
def optimier(self):
def optimizer(self):
return self._optimizer
......@@ -57,7 +57,7 @@ class ImageClassificationReader:
elif phase == "test":
shuffle = False
data = self.dataset.test_data(shuffle)
elif phase == "validate":
elif phase == "val" or phase == "dev":
shuffle = False
data = self.dataset.validate_data(shuffle)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册