Skip to content

Commit f8b60bf

Browse files
Update softmax_regression_train.py
1 parent f58cac8 commit f8b60bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter_2 Softmax Regression/softmax_regression_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def load_data(inputfile):
2121
lines = line.strip().split("\t")
2222
for i in xrange(len(lines) - 1):
2323
feature_tmp.append(float(lines[i]))
24-
label_data.append(float(lines[-1]))
24+
label_data.append(int(lines[-1]))
2525

2626
feature_data.append(feature_tmp)
2727
f.close() # 关闭文件

0 commit comments

Comments
 (0)