更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 34s

This commit is contained in:
cy
2024-11-01 18:44:17 +08:00
parent daea703fea
commit 7ae904507c
+1 -1
View File
@@ -42,7 +42,7 @@ def train_logreg(X, y, learning_rate=0.05, iterations=1500, batch_size=64, regul
Returns:
- numpy array: 训练得到的权重。
"""
m, n = X.shape
m, n = X.shape
weights = np.random.randn(n) * 0.01
for i in range(iterations):