luvata / cs224n-2019 Goto Github PK
View Code? Open in Web Editor NEWMy completed solutions for CS224N 2021 & 2019
My completed solutions for CS224N 2021 & 2019
In assignment4, when executing "sh run.sh train" ,after about 4 or 5 hours, it stops with the information like this:
"
begin validation...
validation: iter 94000, dev . ppl 17.209386
hit patience 5
hit #5 trial
early stop!
"
do you know why?
I ran sh run.sh train and I got an early stopping while loss is about 28.
It seems underfitting.
Do you use the default arguments to train for the result?
I use the default and the BLEU score is far beneath 21.
In nmt_model.py line 215, the code chops off the last row of the target padded. What does this mean? It just deletes the END token of the longest sentences and other END tokens of the shorter sentences are kept? I would be very appreciate for your help.
Nice work!
The version of implementation can reach 22+ BLUE score. However, my implementation have only 0.16+ BLUE score on test dataset. Comparing with your work, I found changing the concatenation torch.cat((Y_t, o_pre), dim=1) to torch.cat((o_pre, Y_t), dim=1) can only reach 0.16+ BLUE score.
Would you like share your ideas why concatenating Y_t and o_pre in such way?
Thank you!
Hi~
The assignment 5 of CS224N is required Stanford login but I still want to finish it. And I saw you maybe have the origin code of this assignment. Could you help me about it?
Thanks a lot.
as you defined, result N*1 matrix with value always 1.
because I think
‘’‘
Arguments:
x -- A D dimensional vector or N x D dimensional numpy matrix.
’‘’
if len(x.shape) > 1:
# Matrix
tmp = np.max(x, axis=1)
x -= tmp.reshape((x.shape[0], 1)) # I think this is error, because tmp after reshaping is x, x-x always zero
x = np.exp(x) # this will [[e],[e],[e]......]
tmp = np.sum(x, axis=1)
x /= tmp.reshape((x.shape[0], 1))
I don't konw if my thought about softmax is wrong?
‘’‘
Arguments:
x -- A N x 1 dimensional numpy matrix. come from UT*V
’‘’
# my code
if len(x.shape) > 1:
# Matrix
tmp = np.max(x, axis=1)
tmp = np.exp(tmp)
tmp = np.sum(tmp)
x = np.exp(x)
x /= tmp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.