Giter Site home page Giter Site logo

cs231n's Issues

Assigment 2 - Train Model

Hi, can you please explain me a bit how did you come to the best train model in Assignment 2 - Fully Connected Nets - Train a good model!?

How did you end with this?

weight_scale = 5e-2
learning_rate = 1e-3 
model = FullyConnectedNet([100, 75, 50, 25],
              weight_scale=weight_scale, dtype=np.float64)

Thanks !

Andres

Assignment1- Svm_loss_vetorized

Line 133: Linear_svm.py
X_mask[np.arange(num_train), y] = -incorrect_counts
should be:
X_mask[np.arange(num_train), y] -= incorrect_counts

About the best k

Hi, there is a problem that is a little wired.

When test the best_k, or in cross_validation, the result shows that the best k is near k == 10, because of the highest peak. However, when I did the following step, in which I change the k's value and get the result greater than 0.28. When k == 10, the result is not very good, but when k == 5, the result is highest .

So, My question is:

  1. What's your best k of cross validation?
  2. If your best k also is 10, is the best accuracy when k == 10 in the last test step?

Thanks!

ps: The plot diagram has been uploaded in my github, you could see the details: https://github.com/fortyMiles/cs231n/blob/master/assignment1/knn.ipynb

Incorrect Cross-validation for knn.

In knn.ipynb file, you have:

y_cross_validation_pred = classifier_k.predict_labels(X_train_folds[n], k)

This is incorrect because predict_labels takes in a distance matrix but you pass in a raw test matrix. So, you need to have an additional step as:

dists = classifier.compute_distances_no_loops(X_train_folds[n])
y_cross_validation_pred = classifier_k.predict_labels(dists, k)

Or you can use predict function in k_nearest_neighbor which technically does the same thing:

y_cross_validation_pred = classifier_k.predict(dists, k)

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.