Skip to content

Commit e3db6b4

Browse files
committed
fixed bug in doc
1 parent fa432d2 commit e3db6b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CollaborativeCoding/metrics/precision.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class Precision(nn.Module):
1010
----------
1111
num_classes : int
1212
Number of classes in the dataset.
13-
micro_averaging : bool
14-
Performs micro-averaging if True, otherwise macro-averaging.
13+
macro_averaging : bool
14+
Performs macro-averaging if True, otherwise micro-averaging.
1515
"""
1616

1717
def __init__(self, num_classes: int, macro_averaging: bool = False):

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def main():
145145
for x, y in tqdm(trainloader, desc="Training"):
146146
x, y = x.to(device), y.to(device)
147147
logits = model.forward(x)
148-
loss = criterion(logits, y)
148+
loss = criterion(logits, y)
149149
loss.backward()
150150

151151
optimizer.step()

0 commit comments

Comments
 (0)