1209 ValueError: too many values to unpack (expected 4)

19:43
ValueError: too many values to unpack (expected 4)
1209 ValueError: too many values to unpack (expected 4)_第1张图片
19:49

SyntaxError: invalid character in identifier

解释器提示如:SyntaxError: invalid character in identifier, 但又一直找不到问题点的话,请确保代码行内没有夹杂中文的空格,tab等,非文字字符.
1209 ValueError: too many values to unpack (expected 4)_第2张图片
22:04

RuntimeWarning: invalid value encountered in double_scalars
cost += self.cost.fn(a, y)/len(data)

RuntimeWarning: divide by zero encountered in log
return np.sum(np.nan_to_num(-y*np.log(a)-(1-y)*np.log(1-a)))

22:08

1209 ValueError: too many values to unpack (expected 4)_第3张图片
白色运行结果:
1209 ValueError: too many values to unpack (expected 4)_第4张图片
注释掉的运行结果:

你可能感兴趣的:(毕设,python)