Skip to content

Commit dfc5f15

Browse files
authored
Update README.md
1 parent f0d5355 commit dfc5f15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It is essentially an enhancement to cross-entropy loss and is useful for classif
2222
This repo supports importing modules through `torch.hub`. `FocalLoss` can be easily imported into your code via, for example:
2323
```python3
2424
focal_loss = torch.hub.load(
25-
github='adeelh/pytorch-multi-class-focal-loss',
25+
repo_or_dir='adeelh/pytorch-multi-class-focal-loss',
2626
model='FocalLoss',
2727
alpha=torch.tensor([.75, .25]),
2828
gamma=2,
@@ -35,7 +35,7 @@ loss = focal_loss(x, y)
3535
Or:
3636
```python3
3737
focal_loss = torch.hub.load(
38-
github='adeelh/pytorch-multi-class-focal-loss',
38+
repo_or_dir='adeelh/pytorch-multi-class-focal-loss',
3939
model='focal_loss',
4040
alpha=[.75, .25],
4141
gamma=2,
@@ -46,4 +46,4 @@ focal_loss = torch.hub.load(
4646
)
4747
x, y = torch.randn(10, 2), (torch.rand(10) > .5).long()
4848
loss = focal_loss(x, y)
49-
```
49+
```

0 commit comments

Comments
 (0)