Skip to content

Commit fb0e3f8

Browse files
committed
fixed bug communicating with MetricWrapper
1 parent 707c119 commit fb0e3f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def main():
144144
for x, y in tqdm(trainloader, desc="Training"):
145145
x, y = x.to(device), y.to(device)
146146
logits = model.forward(x)
147-
from IPython import embed; embed()
148147
loss = criterion(logits, y)
149148
loss.backward()
150149

@@ -172,8 +171,8 @@ def main():
172171
"Train loss": np.mean(trainingloss),
173172
"Validation loss": np.mean(valloss),
174173
}
175-
| train_metrics.getmetric(str_prefix="Train ")
176-
| val_metrics.getmetric(str_prefix="Validation ")
174+
| train_metrics.getmetrics(str_prefix="Train ")
175+
| val_metrics.getmetrics(str_prefix="Validation ")
177176
)
178177
train_metrics.resetmetric()
179178
val_metrics.resetmetric()
@@ -192,7 +191,7 @@ def main():
192191

193192
wandb.log(
194193
{"Epoch": 1, "Test loss": np.mean(testloss)}
195-
| test_metrics.getmetric(str_prefix="Test ")
194+
| test_metrics.getmetrics(str_prefix="Test ")
196195
)
197196
test_metrics.resetmetric()
198197

0 commit comments

Comments
 (0)