Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
5a372d05
"examples/vscode:/vscode.git/clone" did not exist on "781b9cec4c362bbcc06b53397fcd1dd53df60718"
Commit
5a372d05
authored
Oct 04, 2018
by
Kai Chen
Browse files
bug fix and update examples
parent
6e8d925e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
10 deletions
+11
-10
.travis.yml
.travis.yml
+3
-1
examples/resnet_cifar.py
examples/resnet_cifar.py
+2
-1
examples/train_cifar10.py
examples/train_cifar10.py
+1
-1
mmcv/fileio/io.py
mmcv/fileio/io.py
+0
-2
mmcv/runner/runner.py
mmcv/runner/runner.py
+3
-3
mmcv/runner/utils.py
mmcv/runner/utils.py
+0
-1
mmcv/visualization/image.py
mmcv/visualization/image.py
+2
-1
No files found.
.travis.yml
View file @
5a372d05
...
...
@@ -8,7 +8,7 @@ before_install:
-
sudo apt-get install -y ffmpeg
install
:
-
pip install opencv-python pyyaml codecov
-
pip install opencv-python pyyaml codecov
flake8
cache
:
pip
:
true
...
...
@@ -23,6 +23,8 @@ python:
-
"
3.5"
-
"
3.6"
before_script
:
flake8
script
:
coverage run --source=mmcv setup.py test
after_success
:
codecov
\ No newline at end of file
examples/resnet_cifar.py
View file @
5a372d05
# copied from https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py
# copied from
# https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py
import
torch.nn
as
nn
import
torch.nn.functional
as
F
...
...
examples/train_cifar10.py
View file @
5a372d05
...
...
@@ -8,7 +8,7 @@ import torch.distributed as dist
import
torch.multiprocessing
as
mp
import
torch.nn.functional
as
F
from
mmcv
import
Config
from
mmcv.
torchpack
import
Runner
,
DistSamplerSeedHook
from
mmcv.
runner
import
Runner
,
DistSamplerSeedHook
from
torch.nn.parallel
import
DataParallel
,
DistributedDataParallel
from
torch.utils.data
import
DataLoader
from
torch.utils.data.distributed
import
DistributedSampler
...
...
mmcv/fileio/io.py
View file @
5a372d05
import
functools
from
.handlers
import
BaseFileHandler
,
JsonHandler
,
PickleHandler
,
YamlHandler
from
..utils
import
is_str
,
is_list_of
...
...
mmcv/runner/runner.py
View file @
5a372d05
...
...
@@ -8,8 +8,8 @@ import torch
from
.
import
hooks
from
.log_buffer
import
LogBuffer
from
.hooks
import
(
Hook
,
LrUpdaterHook
,
CheckpointHook
,
IterTimerHook
,
OptimizerHook
)
from
.
io
import
load_checkpoint
,
save_checkpoint
OptimizerHook
,
lr_updater
)
from
.
checkpoint
import
load_checkpoint
,
save_checkpoint
from
.utils
import
get_dist_info
,
get_host_info
,
get_time_str
,
obj_from_dict
...
...
@@ -331,7 +331,7 @@ class Runner(object):
self
.
register_hook
(
lr_config
)
elif
isinstance
(
lr_config
,
dict
):
assert
'policy'
in
lr_config
from
.
.hooks
import
lr_updater
#
from .hooks import lr_updater
hook_name
=
lr_config
[
'policy'
].
title
()
+
'LrUpdaterHook'
if
not
hasattr
(
lr_updater
,
hook_name
):
raise
ValueError
(
'"{}" does not exist'
.
format
(
hook_name
))
...
...
mmcv/runner/utils.py
View file @
5a372d05
import
functools
import
logging
import
sys
import
time
from
getpass
import
getuser
...
...
mmcv/visualization/image.py
View file @
5a372d05
...
...
@@ -83,7 +83,8 @@ def imshow_det_bboxes(img,
Args:
img (str or ndarray): The image to be displayed.
bboxes (ndarray): Bounding boxes (with scores), shaped (n, 4) or (n, 5).
bboxes (ndarray): Bounding boxes (with scores), shaped (n, 4) or
(n, 5).
labels (ndarray): Labels of bboxes.
class_names (list[str]): Names of each classes.
score_thr (float): Minimum score of bboxes to be shown.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment