Mercurial > ift6266
diff transformations/affine_transform.py @ 120:5e00ed18ae32
changed some transformation paramters to better fit with visualization
author | Xavier Glorot <glorotxa@iro.umontreal.ca> |
---|---|
date | Wed, 17 Feb 2010 17:45:48 -0500 |
parents | 859ebd7f8754 |
children | b852dddf43a6 |
line wrap: on
line diff
--- a/transformations/affine_transform.py Wed Feb 17 17:06:54 2010 -0500 +++ b/transformations/affine_transform.py Wed Feb 17 17:45:48 2010 -0500 @@ -19,12 +19,12 @@ self.rng = numpy.random.RandomState() self.complexity = complexity params = self.rng.uniform(size=6) -.5 - self.a = 1. + params[0]*.4*complexity - self.b = 0. + params[1]*.4*complexity - self.c = params[2]*8.*complexity - self.d = 0. + params[3]*.4*complexity - self.e = 1. + params[4]*.4*complexity - self.f = params[5]*8.*complexity + self.a = 1. + params[0]*.8*complexity + self.b = 0. + params[1]*.8*complexity + self.c = params[2]*9.*complexity + self.d = 0. + params[3]*.8*complexity + self.e = 1. + params[4]*.8*complexity + self.f = params[5]*9.*complexity def _get_current_parameters(self): @@ -44,12 +44,12 @@ self.complexity = complexity params = self.rng.uniform(size=6) -.5 - self.a = 1. + params[0]*.4*complexity - self.b = 0. + params[1]*.4*complexity - self.c = params[2]*8.*complexity - self.d = 0. + params[3]*.4*complexity - self.e = 1. + params[4]*.4*complexity - self.f = params[5]*8.*complexity + self.a = 1. + params[0]*.8*complexity + self.b = 0. + params[1]*.8*complexity + self.c = params[2]*9.*complexity + self.d = 0. + params[3]*.8*complexity + self.e = 1. + params[4]*.8*complexity + self.f = params[5]*9.*complexity return self._get_current_parameters()