예제 #1
0
파일: Layers.py 프로젝트: rubeeny/RNN
    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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #6
0
파일: Layers.py 프로젝트: rubeeny/RNN
 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