Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
fb4dd633
Commit
fb4dd633
authored
Mar 24, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make matplotlib optional in tensorpack/
parent
5ab89843
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
tensorpack/utils/develop.py
tensorpack/utils/develop.py
+1
-1
tensorpack/utils/viz.py
tensorpack/utils/viz.py
+6
-5
No files found.
tensorpack/utils/develop.py
View file @
fb4dd633
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: develop.py
# Author:
Yuxin Wu <ppwwyyxxc@gmail.com>
# Author:
tensorpack contributors
""" Utilities for developers only.
...
...
tensorpack/utils/viz.py
View file @
fb4dd633
...
...
@@ -11,11 +11,6 @@ import cv2
from
.fs
import
mkdir_p
from
.argtools
import
shape2d
try
:
import
matplotlib.pyplot
as
plt
except
ImportError
:
pass
__all__
=
[
'pyplot2img'
,
'interactive_imshow'
,
'stack_patches'
,
'gen_stack_patches'
,
...
...
@@ -351,6 +346,12 @@ def intensity_to_rgb(intensity, cmap='cubehelix', normalize=False):
intensity
=
cmap
(
intensity
)[
...
,
:
3
]
return
intensity
.
astype
(
'float32'
)
*
255.0
from
..utils.develop
import
create_dummy_func
# noqa
try
:
import
matplotlib.pyplot
as
plt
except
ImportError
:
pyplot2img
=
create_dummy_func
(
'pyplot2img'
)
# noqa
intensity_to_rgb
=
create_dummy_func
(
'intensity_to_rgb'
)
# noqa
if
__name__
==
'__main__'
:
if
False
:
...
...
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