Skip to content

Commit

Permalink
clean optimizer code (#2947)
Browse files Browse the repository at this point in the history
* clean optimizer code

* remove duplicate test optimizer

* fix test_config error
  • Loading branch information
yhcao6 authored Jun 8, 2020
1 parent a04a482 commit b5de202
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 678 deletions.
6 changes: 3 additions & 3 deletions mmdet/apis/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import torch
import torch.distributed as dist
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import DistSamplerSeedHook, OptimizerHook, Runner
from mmcv.runner import (DistSamplerSeedHook, OptimizerHook, Runner,
build_optimizer)

from mmdet.core import (DistEvalHook, EvalHook, Fp16OptimizerHook,
build_optimizer)
from mmdet.core import DistEvalHook, EvalHook, Fp16OptimizerHook
from mmdet.datasets import build_dataloader, build_dataset
from mmdet.utils import get_root_logger

Expand Down
1 change: 0 additions & 1 deletion mmdet/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
from .evaluation import * # noqa: F401, F403
from .fp16 import * # noqa: F401, F403
from .mask import * # noqa: F401, F403
from .optimizer import * # noqa: F401, F403
from .post_processing import * # noqa: F401, F403
from .utils import * # noqa: F401, F403
9 changes: 0 additions & 9 deletions mmdet/core/optimizer/__init__.py

This file was deleted.

42 changes: 0 additions & 42 deletions mmdet/core/optimizer/builder.py

This file was deleted.

13 changes: 0 additions & 13 deletions mmdet/core/optimizer/copy_of_sgd.py

This file was deleted.

162 changes: 0 additions & 162 deletions mmdet/core/optimizer/default_constructor.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from os.path import dirname, exists, join, relpath

import torch
from mmcv.runner import build_optimizer

from mmdet.core import BitmapMasks, PolygonMasks
from mmdet.core.optimizer import build_optimizer


def _get_config_directory():
Expand Down
Loading

0 comments on commit b5de202

Please sign in to comment.