forked from facebookresearch/detectron2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: fairinternal/detectron2#471 Reviewed By: theschnitz Differential Revision: D24602311 Pulled By: ppwwyyxx fbshipit-source-id: fa8b59bbbf11a8a0f8f47a97d756f353081157ea
- Loading branch information
1 parent
406f5a8
commit 29e85f9
Showing
6 changed files
with
94 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
import unittest | ||
from torch import nn | ||
|
||
from detectron2.layers import ASPP, DepthwiseSeparableConv2d | ||
|
||
|
||
class TestBlocks(unittest.TestCase): | ||
def test_separable_conv(self): | ||
DepthwiseSeparableConv2d(3, 10, norm1="BN", activation1=nn.PReLU()) | ||
|
||
def test_aspp(self): | ||
m = ASPP(3, 10, [2, 3, 4], norm="", activation=nn.PReLU()) | ||
self.assertIsNot(m.convs[0].activation.weight, m.convs[1].activation.weight) | ||
self.assertIsNot(m.convs[0].activation.weight, m.project.activation.weight) |