after clang-format

avx_docs
wangyang59 8 years ago
parent ff4e046378
commit 828303bd5f

@ -1,6 +1,7 @@
from paddle.trainer.PyDataProvider2 import * from paddle.trainer.PyDataProvider2 import *
import numpy import numpy
# Define a py data provider # Define a py data provider
@provider( @provider(
input_types={'pixel': dense_vector(28 * 28), input_types={'pixel': dense_vector(28 * 28),
@ -21,7 +22,8 @@ def process(settings, filename): # settings is not used currently.
else: else:
n = 10000 n = 10000
images = numpy.fromfile(f, 'ubyte', count=n*28*28).reshape((n, 28*28)).astype('float32') images = numpy.fromfile(
f, 'ubyte', count=n * 28 * 28).reshape((n, 28 * 28)).astype('float32')
images = images / 255.0 * 2.0 - 1.0 images = images / 255.0 * 2.0 - 1.0
labels = numpy.fromfile(l, 'ubyte', count=n).astype("int") labels = numpy.fromfile(l, 'ubyte', count=n).astype("int")

Loading…
Cancel
Save