Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assignments/assignment2/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def l2_regularization(W, reg_strength):
return loss, grad


def softmax_with_cross_entropy(preds, target_index):
def softmax_with_cross_entropy(predictions, target_index):
"""
Computes softmax and cross-entropy loss for model predictions,
including the gradient
Expand All @@ -36,7 +36,7 @@ def softmax_with_cross_entropy(preds, target_index):
# TODO: Copy from the previous assignment
raise Exception("Not implemented!")

return loss, d_preds
return loss, dprediction


class Param:
Expand Down Expand Up @@ -117,7 +117,7 @@ def backward(self, d_out):

raise Exception("Not implemented!")

return d_input
return d_result

def params(self):
return {'W': self.W, 'B': self.B}