提交 52df85f4 编写于 作者: T typhoonzero

fix style

上级 978396e7
......@@ -50,11 +50,7 @@ parser.add_argument(
default='CPU',
choices=['CPU', 'GPU'],
help="The device type.")
parser.add_argument(
'--device_id',
type=int,
default=0,
help="The device id.")
parser.add_argument('--device_id', type=int, default=0, help="The device id.")
parser.add_argument(
'--data_format',
type=str,
......@@ -140,7 +136,8 @@ def main():
optimize_ops, params_grads = optimizer.minimize(avg_cost)
# Initialize executor
place = core.CPUPlace() if args.device == 'CPU' else core.CUDAPlace(args.device_id)
place = core.CPUPlace() if args.device == 'CPU' else core.CUDAPlace(
args.device_id)
exe = fluid.Executor(place)
# test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册