Created by: luotao1
- add ParallelDo example for multi-thread CPU training in
benchmark/fluid
. For four models inbenchmark/fluid
, only add ParallelDo example formnist
andresnet
now. - add
--cpus
arguments to specify the number of cpus. The usage likes:
python fluid_benchmark.py --model resnet --batch_size=64 --pass_num 5 --device CPU --data_set cifar10 --no_test --cpus=20
- remove unused
batch_size_tensor = fluid.layers.create_tensor(dtype='int64')
, sincefluid.layers.accuracy(input=predict, label=label)
will auto create it. https://github.com/PaddlePaddle/Paddle/blob/ee9832a7a9fc314995e529f715656ba4b3b0e2b3/python/paddle/fluid/layers/metric.py#L28-L39