From 2497fd9e7a0fae5ee4887890d7a312e0e08a93b8 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 22 Jun 2015 19:01:29 +0800 Subject: major change: use luarocks to manage project --- layer/bias.lua | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 layer/bias.lua (limited to 'layer/bias.lua') diff --git a/layer/bias.lua b/layer/bias.lua deleted file mode 100644 index c99274d..0000000 --- a/layer/bias.lua +++ /dev/null @@ -1,28 +0,0 @@ -local BiasLayer = nerv.class("nerv.BiasLayer", "nerv.Layer") - -function BiasLayer:__init(id, global_conf, layer_conf) - self.id = id - self.gconf = global_conf - self.bias = layer_conf.bias - self.dim_in = layer_conf.dim_in - self.dim_out = layer_conf.dim_out - self:check_dim_len(1, 1) -end - -function BiasLayer:init() - if self.dim_in[1] ~= self.bias.trans:ncol() then - nerv.error("mismatching dimensions of input and bias parameter") - end - if self.dim_out[1] ~= self.bias.trans:ncol() then - nerv.error("mismatching dimensions of output and bias parameter") - end -end - -function BiasLayer:propagate(input, output) - output[1]:copy_fromd(input[1]) - output[1]:add_row(self.bias.trans, 1.0) -end - -function BiasLayer:get_params() - return nerv.ParamRepo({self.bias}) -end -- cgit v1.2.3-70-g09d2