diff --git a/python/paddle/v2/dataset/conll05.py b/python/paddle/v2/dataset/conll05.py index cf1ea8ac5a3f14d79c71bceafd61a43ca7919111..2638b63989cc4af5981280dc91c9b0c34735acb2 100644 --- a/python/paddle/v2/dataset/conll05.py +++ b/python/paddle/v2/dataset/conll05.py @@ -24,7 +24,6 @@ import gzip import itertools from common import download - __all__ = ['test, get_dict', 'get_embedding'] DATA_URL = 'http://www.cs.upc.edu/~srlconll/conll05st-tests.tar.gz' diff --git a/python/paddle/v2/dataset/movielens.py b/python/paddle/v2/dataset/movielens.py index 822f7f293df126434c9aee89fc13b87ccf0c342f..ea0f83b8d405eda6a4c55f849235367149e7da20 100644 --- a/python/paddle/v2/dataset/movielens.py +++ b/python/paddle/v2/dataset/movielens.py @@ -42,6 +42,7 @@ class MovieInfo(object): """ Movie id, title and categories information are stored in MovieInfo. """ + def __init__(self, index, categories, title): self.index = int(index) self.categories = categories @@ -68,6 +69,7 @@ class UserInfo(object): """ User id, gender, age, and job information are stored in UserInfo. """ + def __init__(self, index, gender, age, job_id): self.index = int(index) self.is_male = gender == 'M' diff --git a/python/paddle/v2/inference.py b/python/paddle/v2/inference.py index 848546a1df420f83774fad367561ca0c2628fb78..a39b46b40f10093fcff7c8de13de61807ac7f168 100644 --- a/python/paddle/v2/inference.py +++ b/python/paddle/v2/inference.py @@ -19,6 +19,7 @@ class Inference(object): :param parameters: The parameters dictionary. :type parameters: paddle.v2.parameters.Parameters """ + def __init__(self, output_layer, parameters): topo = topology.Topology(output_layer) gm = api.GradientMachine.createFromConfigProto( diff --git a/python/paddle/v2/trainer.py b/python/paddle/v2/trainer.py index 15fcefef45b3a8a4e70ddbf1d94aeb2652c7f5bd..4a6d912596da472059dc5c5a673017a66d9b71b4 100644 --- a/python/paddle/v2/trainer.py +++ b/python/paddle/v2/trainer.py @@ -14,7 +14,6 @@ from . import parameters as v2_parameters __all__ = ['SGD'] - def default_event_handler(event): """ Default event handler. It will print some log and save mode.