From e6ea10bd32cef61565206358a104d1b17ba162f7 Mon Sep 17 00:00:00 2001 From: txh18 Date: Mon, 30 Nov 2015 15:17:14 +0800 Subject: small opt for initing tnn:clip_t --- nerv/examples/lmptb/tnn/tnn.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nerv/examples/lmptb/tnn/tnn.lua b/nerv/examples/lmptb/tnn/tnn.lua index db6cdd7..5448088 100644 --- a/nerv/examples/lmptb/tnn/tnn.lua +++ b/nerv/examples/lmptb/tnn/tnn.lua @@ -91,6 +91,9 @@ end function TNN:__init(id, global_conf, layer_conf) self.clip_t = layer_conf.clip_t + if self.clip_t == nil then + self.clip_t = 0 + end if self.clip_t > 0 then nerv.info("tnn(%s) will clip gradient across time with %f...", id, self.clip_t) end -- cgit v1.2.3-70-g09d2