INNER CODE UNIT · Python

encode_ws

taishi-i/nagisa · nagisa/model.py:82

    def encode_ws(self, X, train=False):
        dy.renew_cg()

        # Remove dy.parameters(...) for DyNet v.2.1
        #w_ws = dy.parameter(self.w_ws)
        #b_ws = dy.parameter(self.b_ws)
        w_ws = self.w_ws
        b_ws = self.b_ws

        ipts = []
        length = len(X[0])
        for i in range(length):
            uni   = X[0][i]
            bi    = X[1][i]
            ctype = X[2][i]
            start = X[3][i]
            end   = X[4][i]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…