def connect(self): self.w_i = self.init((self.n_in, self.n_out), name="w_i") self.w_f = self.init((self.n_in, self.n_out), name="w_f") self.w_o = self.init((self.n_in, self.n_out), name="w_o") self.w_c = self.init((self.n_in, self.n_out), name="w_c") self.b_i = shared0s(self.n_out, name="b_i") self.b_f = shared0s(self.n_out, name="b_f") self.b_o = shared0s(self.n_out, name="b_o") self.b_c = shared0s(self.n_out, name="b_c") self.u_i = self.init((self.n_out, self.n_out), name="u_i") self.u_f = self.init((self.n_out, self.n_out), name="u_f") self.u_o = self.init((self.n_out, self.n_out), name="u_o") self.u_c = self.init((self.n_out, self.n_out), name="u_c") self.params = [self.w_i, self.w_f, self.w_o, self.w_c, self.u_i, self.u_f, self.u_o, self.u_c, self.b_i, self.b_f, self.b_o, self.b_c]
def connect(self): self.h0 = shared0s((1, self.n_out), name="h_0") self.w_z = self.init((self.n_in, self.n_out), name="w_z") self.w_r = self.init((self.n_in, self.n_out), name="w_r") self.u_z = self.init((self.n_out, self.n_out), name="u_z") self.u_r = self.init((self.n_out, self.n_out), name="u_r") self.b_z = shared0s(self.n_out, name="b_z") self.b_r = shared0s(self.n_out, name="b_r") self.w_h = self.init((self.n_in, self.n_out), name="w_h") self.u_h = self.init((self.n_out, self.n_out), name="u_h") self.b_h = shared0s(self.n_out, name="b_h") self.params = [self.h0, self.w_z, self.w_r, self.w_h, self.u_z, self.u_r, self.u_h, self.b_z, self.b_r, self.b_h]