Mercurial > ift6266
changeset 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 | 041d68b34b70 |
children | 7640cb31cf1f |
files | transformations/affine_transform.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
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