-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--find-links https://download.pytorch.org/whl/torch_stable.html | ||
torch==1.7.1+cpu | ||
torchvision==0.8.2+cpu | ||
pytorch_lightning==1.1.0 | ||
torch==1.8.0+cpu | ||
torchvision==0.9.0+cpu | ||
pytorch_lightning==1.2.1 | ||
scipy==1.5.4 | ||
timm | ||
pandas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
torch==1.7.1 | ||
torchvision==0.8.2 | ||
pytorch_lightning==1.2.0 | ||
torch==1.8.0 | ||
torchvision==0.9.0 | ||
pytorch_lightning==1.2.1 | ||
scipy==1.5.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import torch | ||
import unittest | ||
import torch.nn as nn | ||
from quickvision import layers | ||
|
||
|
||
class MishTester(unittest.TestCase): | ||
def test_mish(self): | ||
pass | ||
|
||
|
||
class MLPTester(unittest.TestCase): | ||
def test_mlp(self): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import torch | ||
import torch.nn as nn | ||
import unittest | ||
from quickvision import losses | ||
from quickvision.losses import functional as fl | ||
|
||
|
||
class DiceLossTester(unittest.TestCase): | ||
def test_dice_loss_functional(self): | ||
# Same thing what you do with below. | ||
# inputs = torch.tensor([[0.4, 0.2, 0.3], [0.6, 0.2, 0.3]], dtype=torch.float32) | ||
# targets = torch.tensor([[0], [1]], dtype=torch.float32) | ||
# loss = fl.dice_loss(inputs, targets) | ||
# Do a backward | ||
# loss.backward() | ||
# And now compare this loss with known valueQ | ||
# self.assertTrue() | ||
pass | ||
|
||
def test_dice_loss(self): | ||
# loss_fn = losses.DiceLoss() | ||
# inputs = torch.tensor([[0.4, 0.2, 0.3], [0.6, 0.2, 0.3]], dtype=torch.float32) | ||
# targets = torch.tensor([[0], [1]], dtype=torch.float32) | ||
# loss = loss_fn(inputs, targets) | ||
# See what expected loss should be | ||
# expected_loss = [] | ||
# Compare those two with epsilon | ||
# loss.backward() | ||
# Assert those with epsilon case | ||
# self.assertTrue() | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |