Spaces:
Build error
Build error
Commit
·
8cc2d56
1
Parent(s):
e76c709
having to retract to pyhton 3.7 syntax for render
Browse files- cluster/main.py +1 -1
- neural_network/backprop.py +1 -1
cluster/main.py
CHANGED
|
@@ -14,7 +14,7 @@ def main(
|
|
| 14 |
cluster_func = args.pop("algorithm")
|
| 15 |
cluster_alg: Clusterer = clustering_methods[cluster_func]
|
| 16 |
|
| 17 |
-
cluster_args: dict = {"cluster_func": cluster_func}
|
| 18 |
alg = cluster_alg.from_dict(cluster_args)
|
| 19 |
|
| 20 |
alg.build(X)
|
|
|
|
| 14 |
cluster_func = args.pop("algorithm")
|
| 15 |
cluster_alg: Clusterer = clustering_methods[cluster_func]
|
| 16 |
|
| 17 |
+
cluster_args: dict = {"cluster_func": cluster_func}.update(args)
|
| 18 |
alg = cluster_alg.from_dict(cluster_args)
|
| 19 |
|
| 20 |
alg.build(X)
|
neural_network/backprop.py
CHANGED
|
@@ -24,7 +24,7 @@ def bp(
|
|
| 24 |
wb: dict,
|
| 25 |
args: dict,
|
| 26 |
) -> NeuralNetwork:
|
| 27 |
-
model = NeuralNetwork.from_dict(args
|
| 28 |
loss_history = []
|
| 29 |
for _ in range(model.epochs):
|
| 30 |
# forward prop
|
|
|
|
| 24 |
wb: dict,
|
| 25 |
args: dict,
|
| 26 |
) -> NeuralNetwork:
|
| 27 |
+
model = NeuralNetwork.from_dict(args.update(wb))
|
| 28 |
loss_history = []
|
| 29 |
for _ in range(model.epochs):
|
| 30 |
# forward prop
|