Commit 5686a375 authored by Kai Chen's avatar Kai Chen
Browse files

some renaming

parent c47c4480
from .rpn_ops import * # noqa: F401, F403
from .anchor import * # noqa: F401, F403
from .bbox_ops import * # noqa: F401, F403
from .mask_ops import * # noqa: F401, F403
from .losses import * # noqa: F401, F403
......
from .dist_utils import (init_dist, reduce_grads, DistOptimizerHook,
DistSamplerSeedHook)
from .hooks import EmptyCacheHook
from .misc import tensor2imgs, unmap, multi_apply
__all__ = [
'init_dist', 'reduce_grads', 'DistOptimizerHook', 'DistSamplerSeedHook',
'EmptyCacheHook', 'tensor2imgs', 'unmap', 'multi_apply'
'tensor2imgs', 'unmap', 'multi_apply'
]
import torch
from mmcv.runner import Hook
class EmptyCacheHook(Hook):
def before_epoch(self, runner):
torch.cuda.empty_cache()
def after_epoch(self, runner):
torch.cuda.empty_cache()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment