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
19181d7e
Commit
19181d7e
authored
Nov 19, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] clear CUDA_VISIBLE_DEVICES in data may cause error (#494)
parent
ced8330e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
examples/FasterRCNN/utils/box_ops.py
examples/FasterRCNN/utils/box_ops.py
+3
-4
No files found.
examples/FasterRCNN/utils/box_ops.py
View file @
19181d7e
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# File: box_ops.py
# File: box_ops.py
import
os
import
tensorflow
as
tf
import
tensorflow
as
tf
from
tensorpack.tfutils.scope_utils
import
under_name_scope
from
tensorpack.tfutils.scope_utils
import
under_name_scope
from
tensorpack.tfutils
import
get_default_sess_config
from
tensorpack.tfutils
import
get_default_sess_config
...
@@ -75,12 +74,12 @@ def get_iou_callable():
...
@@ -75,12 +74,12 @@ def get_iou_callable():
"""
"""
Get a pairwise box iou callable.
Get a pairwise box iou callable.
"""
"""
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
''
# we don't want the dataflow process to touch CUDA
# We don't want the dataflow process to touch CUDA
# Data needs tensorflow. As a result, the training cannot run on GPUs with
# EXCLUSIVE_PROCESS mode, unless you disable multiprocessing prefetch.
with
tf
.
Graph
()
.
as_default
(),
tf
.
device
(
'/cpu:0'
):
with
tf
.
Graph
()
.
as_default
(),
tf
.
device
(
'/cpu:0'
):
A
=
tf
.
placeholder
(
tf
.
float32
,
shape
=
[
None
,
4
])
A
=
tf
.
placeholder
(
tf
.
float32
,
shape
=
[
None
,
4
])
B
=
tf
.
placeholder
(
tf
.
float32
,
shape
=
[
None
,
4
])
B
=
tf
.
placeholder
(
tf
.
float32
,
shape
=
[
None
,
4
])
iou
=
pairwise_iou
(
A
,
B
)
iou
=
pairwise_iou
(
A
,
B
)
tf
.
logging
.
set_verbosity
(
tf
.
logging
.
FATAL
)
# TF will warn about GPU not found
sess
=
tf
.
Session
(
config
=
get_default_sess_config
())
sess
=
tf
.
Session
(
config
=
get_default_sess_config
())
tf
.
logging
.
set_verbosity
(
tf
.
logging
.
INFO
)
return
sess
.
make_callable
(
iou
,
[
A
,
B
])
return
sess
.
make_callable
(
iou
,
[
A
,
B
])
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