(self, error, inference=False, alpha=1.0, beta=0.0)
return hidden_error_list
bprop through layers, saving hidden_error for Recurrent layers
bprop through layers, saving hidden_error for Recurrent layers
bprop through layers saving hidden_error for Recurrent layers
def bprop(self, error, inference=False, alpha=1.0, beta=0.0):
        """
        bprop through layers, saving hidden_error for Recurrent layers
        """
        hidden_error_list = []
        for l in reversed(self.layers):
            altered_tensor = l.be.distribute_data(error, l.parallelism)
            if altered_tensor:
                l.revert_list.append(altered_tensor)

            error = l.bprop(error)
            if isinstance(l, Recurrent):
                hidden_error_list.append(l.get_final_hidden_error())

            for tensor in l.revert_list:
                self.be.revert_tensor(tensor)

        # return hidden error in order of decoder layers
        # (to match decoder_connections)
        hidden_error_list.reverse()

        return hidden_error_list
def bprop ( self , error , inference = False , alpha = 1.0 , beta = 0.0 ) : hidden_error_list = [ ] for l in reversed ( self . layers ) : altered_tensor = l . be . distribute_data ( error , l . parallelism ) if altered_tensor : l . revert_list . append ( altered_tensor ) error = l . bprop ( error ) if isinstance ( l , Recurrent ) : hidden_error_list . append ( l . get_final_hidden_error ( ) ) for tensor in l . revert_list : self . be . revert_tensor ( tensor ) # return hidden error in order of decoder layers # (to match decoder_connections) hidden_error_list . reverse ( ) return hidden_error_list