You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to see the difference, I revised the code and ran it on CPU. But The memory occupation raised from 3GB(epoch 1) to 30GB(epoch 8). And it took 8000s per epoch.
The original code took 7000s per epoch and 2.6GB.
Did I misunderstand something?
Thanks!
The text was updated successfully, but these errors were encountered:
But in the greedyCWS, there is no need to calculate the update gate for word representation. In the paper
an update gate z (As in Figure 2), which has been shown helpless to the performance but requires uge computational cost according toour empirical study.
So I read the dy_model.py and get the same question.
update_gate = dy.transpose(dy.concatenate_cols([dy.softmax(dy.pickrange(update_logits,i*(wlen+1),(i+1)*(wlen+1))) for i in xrange(self.options['ndims'])]))
which I thought to be:
update_gate = dy.concatenate_cols([dy.softmax(dy.pickrange(update_logits,i*(self.options['ndims']+1),(i+1)*(self.options['ndims']+1))) for i in xrange(wlen)])
Thanks for you paper and code.
But I'm confused with some code.
In
src/model.py
function
get_score()
-> functioninner_one_step()
update_gate = T.exp(T.dot(ugW[:ln+nhiddens,an+ln-nhiddens:an+ln+ln],com)+ugb[an+ln-nhiddens:an+ln+ln]).reshape((len+1,nhiddens))
and in
src/tools.py
function
get_word()
update_gate = np.exp(np.dot(ugW[:ln+ndims,an+ln-ndims:an+ln+ln],com)+ugb[an+ln-ndims:an+ln+ln]).reshape((len+1,ndims))
I think they should be
and
Since the code
represent a vector
where ei_j derived from the jth elem of ith character.
So the reshape((nhiddens, len+1)) reshape the vector to
which may supposed to be
In order to see the difference, I revised the code and ran it on CPU. But The memory occupation raised from 3GB(epoch 1) to 30GB(epoch 8). And it took 8000s per epoch.
The original code took 7000s per epoch and 2.6GB.
Did I misunderstand something?
Thanks!
The text was updated successfully, but these errors were encountered: