Skip to content

Commit

Permalink
modified linear_classified
Browse files Browse the repository at this point in the history
  • Loading branch information
quinwu committed Jun 19, 2018
1 parent b2c9000 commit 40fc8ef
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions assignment4/homework/DSVC/classifiers/linear_classifier.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from __future__ import print_function

import numpy as np
from cs231n.classifiers.linear_svm import *
from cs231n.classifiers.softmax import *
from DSVC.classifiers.linear_svm import *
from past.builtins import xrange


Expand Down Expand Up @@ -131,10 +130,4 @@ class LinearSVM(LinearClassifier):

def loss(self, X_batch, y_batch, reg):
return svm_loss_vectorized(self.W, X_batch, y_batch, reg)


class Softmax(LinearClassifier):
""" A subclass that uses the Softmax + Cross-entropy loss function """

def loss(self, X_batch, y_batch, reg):
return softmax_loss_vectorized(self.W, X_batch, y_batch, reg)

0 comments on commit 40fc8ef

Please sign in to comment.