generated from LufsX/Experiment-LogReg
This commit is contained in:
@@ -37,6 +37,7 @@ def train_logreg(X, y, learning_rate=0.001, iterations=10000, batch_size=64, lam
|
|||||||
|
|
||||||
if i % 1000 == 0: # 每1000次迭代打印一次信息
|
if i % 1000 == 0: # 每1000次迭代打印一次信息
|
||||||
print(f"迭代 {i}: 当前权重形状: {weights.shape}")
|
print(f"迭代 {i}: 当前权重形状: {weights.shape}")
|
||||||
|
|
||||||
return weights
|
return weights
|
||||||
|
|
||||||
def predict_logreg(inX, weights):
|
def predict_logreg(inX, weights):
|
||||||
|
|||||||
Reference in New Issue
Block a user