Giter Site home page Giter Site logo

luvata / cs224n-2019 Goto Github PK

View Code? Open in Web Editor NEW
316.0 316.0 127.0 145.07 MB

My completed solutions for CS224N 2021 & 2019

Jupyter Notebook 0.68% Shell 0.01% Python 0.64% JavaScript 98.67%
cs224n cs224n-assignment-solutions deep-learning natural-language-processing pytorch stanford synthesizer transformer

cs224n-2019's People

Contributors

luvata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cs224n-2019's Issues

train problem for assignment4

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?

training args

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.

chop off the end symbol in decoder?

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.

Y_t, o_pre concat order issure ?

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!

Where could find the assignment5 on the web?

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.

is softmax function error in 2019 a2 utils

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.