-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 Add safeties
- Loading branch information
Showing
8 changed files
with
66 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import torch | ||
|
||
from torch_uncertainty.models.vgg.packed import ( | ||
packed_vgg11, | ||
packed_vgg16, | ||
packed_vgg19, | ||
) | ||
from torch_uncertainty.models.vgg.std import vgg13, vgg19 | ||
|
||
|
||
class TestStdVGG: | ||
"""Testing the VGG std class.""" | ||
|
||
def test_main(self): | ||
vgg13(1, 10, style="cifar") | ||
vgg19(1, 10, norm=torch.nn.BatchNorm2d) | ||
|
||
|
||
class TestPackedVGG: | ||
"""Testing the VGG packed class.""" | ||
|
||
def test_main(self): | ||
packed_vgg11(2, 10, 2, 2, 1) | ||
packed_vgg16(2, 10, 2, 2, 1) | ||
packed_vgg19(2, 10, 2, 2, 1) |
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,24 @@ | ||
from torch_uncertainty.models.wideresnet.batched import batched_wideresnet28x10 | ||
from torch_uncertainty.models.wideresnet.masked import masked_wideresnet28x10 | ||
from torch_uncertainty.models.wideresnet.packed import packed_wideresnet28x10 | ||
|
||
|
||
class TestPackedResnet: | ||
"""Testing the WideResNet packed class.""" | ||
|
||
def test_main(self): | ||
packed_wideresnet28x10(1, 2, 2, 1, 1, 10, style="cifar") | ||
|
||
|
||
class TestMaskedWide: | ||
"""Testing the WideResNet masked class.""" | ||
|
||
def test_main(self): | ||
masked_wideresnet28x10(1, 2, 2, 1, 10, style="cifar") | ||
|
||
|
||
class TestBatchedWide: | ||
"""Testing the WideResNet batched class.""" | ||
|
||
def test_main(self): | ||
batched_wideresnet28x10(1, 2, 1, 10, style="cifar") |
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
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
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