-
Notifications
You must be signed in to change notification settings - Fork 232
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
7 changed files
with
53 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
from .dump_subnet_hook import DumpSubnetHook | ||
from .estimate_resources_hook import EstimateResourcesHook | ||
from .visualization_hook import RazorVisualizationHook | ||
|
||
# from .quant_hook import QuantitiveHook | ||
|
||
__all__ = ['DumpSubnetHook', 'EstimateResourcesHook'] | ||
__all__ = ['DumpSubnetHook', 'EstimateResourcesHook', 'RazorVisualizationHook'] |
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 |
---|---|---|
@@ -1,17 +1,35 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
class testCustomTracer: | ||
from unittest import TestCase | ||
|
||
def test_init(): | ||
pass | ||
from mmrazor.models.task_modules import CustomTracer, UntracedMethodRegistry | ||
from mmrazor.testing import ConvBNReLU | ||
|
||
|
||
class testCustomTracer(TestCase): | ||
|
||
def test_init(self): | ||
tracer = CustomTracer() | ||
assert tracer.skipped_methods.__len__() == 0 | ||
|
||
def test_trace(): | ||
def test_trace(self): | ||
tracer = CustomTracer() | ||
model = ConvBNReLU(3, 3, norm_cfg=dict(type='BN')) | ||
graph = tracer.trace(model) # noqa: F841 | ||
|
||
def test_auto_skip_call_module(self): | ||
pass | ||
|
||
def test_auto_skip_call_module(): | ||
def test_auto_skip_call_method(self): | ||
pass | ||
|
||
def test_auto_skip_call_method(): | ||
def test_configurable_skipped_methods(self): | ||
pass | ||
|
||
def test_configurable_skipped_methods(): | ||
|
||
class testUntracedMethodRgistry(TestCase): | ||
|
||
def test_init(self): | ||
self.assertEqual(len(UntracedMethodRegistry.method_dict), 0) | ||
|
||
def test_add_method(self): | ||
pass |
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