removed the check on f(y), it was only useful in logtanh

This commit is contained in:
beckdaniel 2016-04-07 18:44:55 +01:00
parent 2d9bdfdbfb
commit e17ee1078b

View file

@ -46,11 +46,7 @@ class WarpingFunction(Parameterized):
it = 0
update = np.inf
while np.abs(update).sum() > 1e-10 and it < max_iterations:
try:
fy = self.f(y)
except ValueError:
sys.stderr.write("One of y's is negative! Stopping inverse calculation.\n")
break
fy = self.f(y)
fgrady = self.fgrad_y(y)
update = (fy - z) / fgrady
y -= self.rate * update