From 33eeaf9c7690936321be767ce7a512cad2b42c5e Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 14 Jun 2018 22:40:52 +0200 Subject: [PATCH] cleanup --- xnes.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/xnes.lua b/xnes.lua index b54179f..b48a654 100644 --- a/xnes.lua +++ b/xnes.lua @@ -68,10 +68,6 @@ function Xnes:init(dims, popsize, learning_rate, sigma, antithetic) -- you can imagine the "s" standing for "sqrt" if you like. self.covars = make_covars(self.dims, self.sigma, self.covars) - --self.log_sigma = log(self.sigma) - --self.log_covars = zeros{dims, dims} - --for i, v in ipairs(self.covars) do self.log_covars[i] = log(v) end - self.mean_adapt = 1.0 end @@ -189,13 +185,6 @@ function Xnes:tell(scored, noise) self.mean[i] = v + self.mean_adapt * step[i] end - --[[ - --self.log_sigma = self.log_sigma + self.learning_rate / 2 * g_sigma - for i, v in ipairs(self.log_covars) do - self.log_covars[i] = v + lr * g_covars[i] - end - --]] - local lr = self.learning_rate * 0.5 self.sigma = self.sigma * exp(lr * g_sigma) for i, v in ipairs(self.covars) do @@ -203,8 +192,6 @@ function Xnes:tell(scored, noise) end -- bookkeeping: - --self.sigma = exp(self.log_sigma) - --for i, v in ipairs(self.log_covars) do self.covars[i] = exp(v) end self.noise = nil return step