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
c2d99a44
Commit
c2d99a44
authored
Mar 06, 2020
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f128a5c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
tensorpack/dataflow/imgaug/imgproc.py
tensorpack/dataflow/imgaug/imgproc.py
+2
-1
tensorpack/predict/base.py
tensorpack/predict/base.py
+11
-3
tensorpack/train/trainers.py
tensorpack/train/trainers.py
+1
-2
No files found.
tensorpack/dataflow/imgaug/imgproc.py
View file @
c2d99a44
...
...
@@ -18,7 +18,8 @@ class Hue(PhotometricAugmentor):
def
__init__
(
self
,
range
=
(
0
,
180
),
rgb
=
True
):
"""
Args:
range(list or tuple): range from which the applied hue offset is selected (maximum [-90,90] or [0,180])
range(list or tuple): range from which the applied hue offset is selected
(maximum range can be [-90,90] for both uint8 and float32)
rgb (bool): whether input is RGB or BGR.
"""
super
(
Hue
,
self
)
.
__init__
()
...
...
tensorpack/predict/base.py
View file @
c2d99a44
...
...
@@ -7,7 +7,7 @@ import six
import
tensorflow
as
tf
from
..input_source
import
PlaceholderInput
from
..tfutils.common
import
get_tensors_by_names
from
..tfutils.common
import
get_tensors_by_names
,
get_op_tensor_name
from
..tfutils.tower
import
PredictTowerContext
__all__
=
[
'PredictorBase'
,
...
...
@@ -34,6 +34,9 @@ class PredictorBase(object):
.. code-block:: python
predictor(e1, e2)
Returns:
list[array]: list of outputs
"""
output
=
self
.
_do_call
(
dp
)
if
self
.
return_input
:
...
...
@@ -98,9 +101,14 @@ class OnlinePredictor(PredictorBase):
will use the default session at the first call.
Note that in TensorFlow, default session is thread-local.
"""
def
normalize_name
(
t
):
if
isinstance
(
t
,
six
.
string_types
):
return
get_op_tensor_name
(
t
)[
1
]
return
t
self
.
return_input
=
return_input
self
.
input_tensors
=
input_tensors
self
.
output_tensors
=
output_tensors
self
.
input_tensors
=
[
normalize_name
(
x
)
for
x
in
input_tensors
]
self
.
output_tensors
=
[
normalize_name
(
x
)
for
x
in
output_tensors
]
self
.
sess
=
sess
if
sess
is
not
None
:
...
...
tensorpack/train/trainers.py
View file @
c2d99a44
...
...
@@ -396,8 +396,7 @@ class HorovodTrainer(SingleCostTrainer):
compression: `hvd.Compression.fp16` or `hvd.Compression.none`
"""
if
'pyarrow'
in
sys
.
modules
:
logger
.
warn
(
"Horovod and pyarrow may conflict due to pyarrow bugs. "
"Uninstall pyarrow and use msgpack instead."
)
logger
.
warn
(
"Horovod and pyarrow may conflict due to pyarrow bugs."
)
# lazy import
import
horovod.tensorflow
as
hvd
import
horovod
...
...
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