-
由 notoraptor 提交于
CPU op MaxAndArgmax rewritten so that it now takes the axes as a parameter op. Same update for GPU op GpuMaxAndArgmax. max_and_argmax wrapper rewritten to fully check the axis before passing it to MaxAndArgmax. Some other files have also been updated to ensure that the optimization which replace CPU op by GPU op works well and that all tests involving MaxAndArgmax still work well after the updates. GPU op rewritten to handle the last libgpuarray update. test_reduction rewritten. It now tests also 0-d arrays (scalars). I have run the following tests with success. The new update of libgpuarray has been downloaded, compiled and fully installed before running these tests. nosetests -v theano/gpuarray/tests/test_opt.py # There is 1 fail here, but not related to MaxAndArgmax: # ERROR: theano.gpuarray.tests.test_opt.test_local_lift_abstractconv_gpu_shape # RuntimeError: cuDNN is required for convolution and pooling nosetests -v theano/tensor/nnet/tests/test_nnet.py nosetests -v theano/tensor/tests/test_opt_uncanonicalize.py nosetests -v theano/tensor/tests/test_basic.py THEANO_FLAGS=floatX=float32,profile=True,profiling.n_ops=1000,profiling.n_apply=1000,profiling.ignore_first_call=True,profiling.destination=profiling.log nosetests --nocapture --verbose theano/gpuarray/tests/test_reduction.py Prevent Flake8!b2ae1db6