提交 d5c66369 authored 作者: Frederic Bastien's avatar Frederic Bastien

make the test less verbose

上级 163deb4b
...@@ -409,9 +409,10 @@ def cmp_run_conv_nnet2_classif(seed, isize, ksize, bsize, ...@@ -409,9 +409,10 @@ def cmp_run_conv_nnet2_classif(seed, isize, ksize, bsize,
theano.tensor.basic.float32_atol=orig_float32_atol theano.tensor.basic.float32_atol=orig_float32_atol
if not cpu_only: if not cpu_only:
print "cpu:", rval_cpu if verbose or not numpy.allclose(rval_cpu, rval_gpu,rtol=1e-3,atol=float_atol):
print "gpu:", rval_gpu print "cpu:", rval_cpu
print "abs diff:", numpy.absolute(rval_gpu-rval_cpu) print "gpu:", rval_gpu
print "abs diff:", numpy.absolute(rval_gpu-rval_cpu)
print "time cpu: %.3f, time gpu: %.3f, speed up %f"%(tc, tg, tc/tg) print "time cpu: %.3f, time gpu: %.3f, speed up %f"%(tc, tg, tc/tg)
print "estimated time for one pass through MNIST with cpu: %f" % (tc * (60000.0 / (n_iter*bsize))) print "estimated time for one pass through MNIST with cpu: %f" % (tc * (60000.0 / (n_iter*bsize)))
print "estimated time for one pass through MNIST with gpu: %f" % (tg * (60000.0 / (n_iter*bsize))) print "estimated time for one pass through MNIST with gpu: %f" % (tg * (60000.0 / (n_iter*bsize)))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论