Exemplo n.º 1
0
    def get_forward_output(self):
        X=self.get_input()
        [h,c], _ = theano.scan(self._fstep, 
                             sequences = X,
                             outputs_info = [alloc_zeros_matrix(self.n_hidden),
                                             alloc_zeros_matrix(self.n_hidden)])
                            # outputs_info =T.unbroadcast(alloc_zeros_matrix(self.input.shape[0],
                             #                                               self.n_hidden), 0) )

        return h
Exemplo n.º 2
0
    def get_output(self):
        X=self.get_input()
        [h,c], _ = theano.scan(self._step, 
                             sequences = X,
                             outputs_info = [alloc_zeros_matrix(self.input.shape[1],
                                                                            self.n_hidden),
                                             alloc_zeros_matrix(self.input.shape[1],
                                                                            self.n_hidden)])

        return h
Exemplo n.º 3
0
    def get_output(self):
        X = self.get_input()
        [h, c], _ = theano.scan(self._step,
                                sequences=X,
                                outputs_info=[
                                    alloc_zeros_matrix(self.input.shape[1],
                                                       self.n_hidden),
                                    alloc_zeros_matrix(self.input.shape[1],
                                                       self.n_hidden)
                                ])

        return h
Exemplo n.º 4
0
    def get_forward_output(self):
        X=self.get_input()
        mask_x=self.x_mask
        h, _ = theano.scan(self._fstep, 
                             sequences = [X,mask_x],
                             outputs_info = alloc_zeros_matrix(self.input.shape[1],
                                                                            self.n_hidden))

        return h
Exemplo n.º 5
0
    def get_forward_output(self):
        X = self.get_input()
        mask_x = self.x_mask
        h, _ = theano.scan(self._fstep,
                           sequences=[X, mask_x],
                           outputs_info=alloc_zeros_matrix(
                               self.input.shape[1], self.n_hidden))

        return h
Exemplo n.º 6
0
 def get_output(self):
     X=self.get_input()
     h, _ = theano.scan(self._step, 
                          sequences = X,
                          outputs_info = alloc_zeros_matrix(self.n_hidden))
                         # outputs_info =T.unbroadcast(alloc_zeros_matrix(self.input.shape[0],
                          #                                               self.n_hidden), 0) )
                         # outputs_info = [T.unbroadcast(T.alloc(self.h0_tm1,
                          #self.n_layers,self.n_hidden),0),])
     return h