Mercurial > ift6266
diff transformations/affine_transform.py @ 154:ce56e8ca960d
Checked all modules to work with only numpy.random and random and to be deterministic after numpy.random.seed() and random.seed()
author | boulanni <nicolas_boulanger@hotmail.com> |
---|---|
date | Wed, 24 Feb 2010 16:59:04 -0500 |
parents | b852dddf43a6 |
children |
line wrap: on
line diff
--- a/transformations/affine_transform.py Wed Feb 24 13:51:18 2010 -0500 +++ b/transformations/affine_transform.py Wed Feb 24 16:59:04 2010 -0500 @@ -16,9 +16,8 @@ class AffineTransformation(): def __init__( self, complexity = .5): self.shape = (32,32) - self.rng = numpy.random.RandomState() self.complexity = complexity - params = self.rng.uniform(size=6) -.5 + params = numpy.random.uniform(size=6) -.5 self.a = 1. + params[0]*.6*complexity self.b = 0. + params[1]*.6*complexity self.c = params[2]*8.*complexity @@ -43,7 +42,7 @@ # the ranges are set manually as to look acceptable self.complexity = complexity - params = self.rng.uniform(size=6) -.5 + params = numpy.random.uniform(size=6) -.5 self.a = 1. + params[0]*.8*complexity self.b = 0. + params[1]*.8*complexity self.c = params[2]*9.*complexity