tutorial_model.py 816 字节
Newer Older
G
gx_wind 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
################################################################################
#
# Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
#
################################################################################
"""

A pure Paddlepaddle implementation of a neural network.

"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import paddle.v2 as paddle
import paddle.v2.fluid as fluid
from advbox import Model

def main():
    """
	example main function
    """
    model_dir = "./mnist_model"
    place = fluid.CPUPlace()
    exe = fluid.Executor(place)
    program, feed_var_names, fetch_vars = fluid.io.load_inferfence_model(model_dir, exe)
    print(program)

if __name__ == "__main__":
    main()