Giter Club home page Giter Club logo

cs231n's Introduction

cs231n

cs231n assignments

all completed on Nov. 21,2016

any questions please email to [email protected]

cs231n's People

Contributors

joshzastrow avatar lightaime 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  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

cs231n's Issues

Linear SVM includes same-class loss

Assignment 1 Q2 Linear SVM
In assignment1/cs231n/classifiers/linear_svm.py
line 79: margins = np.maximum(0, scores - correct_class_scores +1)

It seems line 79 includes the same-class loss adding the total loss by a constant 1*num_train, which might be fine for training, but strictly speaking not correct.

if it should be 'range' in python3.x

dists = np.sqrt(-2*np.dot(X, self.X_train.T) + np.sum(np.square(self.X_train), axis = 1) + np.transpose([np.sum(np.square(X), axis = 1)]))

the fundemental idea just like : (a - b)2 = a2 + b2 - 2ab

A = np.sum(np.square(X), axis=1) # 500 x 1 B = np.transpose(np.sum(np.square(X_train), axis=1)) # 1x5000 two_AB = 2*np.dot(X, self.X_train.T) # 500 x 5000 dicts = np.sqrt(A + B - two_AB)

how could it be broadcasted together with shapes (500,) (1,5000) ?

and anther one, at line 143,
for i in xrange(num_test):

range should be located here ?

issues as line127 k_nearest_neighbor.py

dists = np.sqrt(-2*np.dot(X, self.X_train.T) + np.sum(np.square(self.X_train), axis = 1) + np.transpose([np.sum(np.square(X), axis = 1)]))

the fundemental idea just like : (a - b)2 = a2 + b2 - 2ab

A = np.sum(np.square(X), axis=1)   # 500 x 1

B = np.transpose(np.sum(np.square(X_train), axis=1))  # 1x5000

two_AB = 2*np.dot(X, self.X_train.T)   # 500 x 5000 

dicts = np.sqrt(A + B - two_AB)`

how could it be broadcasted together with shapes (500,) (1,5000) ?
image 334

An issue in Assignment2, fc_net.py

In my opinion,
In line 266, the index of ar_cache should be self.num_layers-1 instead of self.num_layers due to the for loop you used in line 255(self.num_layers-1 is excluded here)
Therefore, a minor change should be made in line 294 as well.
Since you use the index of the output layer (self.num_layers) consistently, your code works perfectly. However, for numerical continuity, there should be self.num_layers-1.
Your code helps me a lot, Thanks so much!
Happy Spring Festival!

Dropout forward pass

Hey, I've been using your code to compare against my own and you've done an amazing job helping out with going through the assignments with clean code.

In the dropout forward pass of assignment two I noticed you have
mask = (np.random.rand(*x.shape) >= p) / (1-p)
And this makes so that your drop out matches your p. But according to the class notes: # probability of keeping a unit active. higher = less dropout

so I believe the line should read:
mask = (np.random.rand(*x.shape) < p) / p

I'm curious because I hope others continue to use your code to learn and get through the class as I have 👍

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.