Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
seiichiinoue committed Jun 23, 2020
1 parent eea14b5 commit b26192e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def softmax(x):


def cross_entropy_error(y, t):
if t.ndim == 2:
if t.ndim == 2 and t[0].size == 1:
t = t.reshape(t.size)
if y.ndim == 1:
t = t.reshape(1, t.size)
Expand Down

0 comments on commit b26192e

Please sign in to comment.