提交 0a0b5b5b 编写于 作者: Q qiaolongfei

change paddle.data to paddle.data_type

上级 984d54d0
......@@ -71,9 +71,9 @@ def main():
# define network
images = paddle_v2.layer.data(
name='pixel', type=paddle_v2.data.dense_vector(784))
name='pixel', type=paddle_v2.data_type.dense_vector(784))
label = paddle_v2.layer.data(
name='label', type=paddle_v2.data.integer_value(10))
name='label', type=paddle_v2.data_type.integer_value(10))
hidden1 = paddle_v2.layer.fc(input=images, size=200)
hidden2 = paddle_v2.layer.fc(input=hidden1, size=200)
inference = paddle_v2.layer.fc(input=hidden2,
......
......@@ -15,8 +15,10 @@ def main():
paddle.init(use_gpu=False, trainer_count=1)
# define network topology
images = paddle.layer.data(name='pixel', type=paddle.data.dense_vector(784))
label = paddle.layer.data(name='label', type=paddle.data.integer_value(10))
images = paddle.layer.data(
name='pixel', type=paddle.data_type.dense_vector(784))
label = paddle.layer.data(
name='label', type=paddle.data_type.integer_value(10))
hidden1 = paddle.layer.fc(input=images, size=200)
hidden2 = paddle.layer.fc(input=hidden1, size=200)
inference = paddle.layer.fc(input=hidden2,
......
......@@ -17,12 +17,12 @@ import activation
import parameters
import trainer
import event
import data
import data_type
import py_paddle.swig_paddle as api
__all__ = [
'optimizer', 'layer', 'activation', 'parameters', 'init', 'trainer',
'event', 'data'
'event', 'data_type.py'
]
......
......@@ -67,7 +67,7 @@ paddle.v2.parameters.create, no longer exposed to users.
"""
import paddle.trainer_config_helpers as conf_helps
from . import data as v2_data
from . import data_type as v2_data
from paddle.trainer_config_helpers.config_parser_utils import \
parse_network_config as __parse__
from paddle.trainer_config_helpers.default_decorators import wrap_name_default
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册