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
70802354
Commit
70802354
authored
Nov 12, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc. update about docs
parent
5140610d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
examples/FasterRCNN/eval.py
examples/FasterRCNN/eval.py
+1
-1
examples/GAN/GAN.py
examples/GAN/GAN.py
+4
-2
No files found.
examples/FasterRCNN/eval.py
View file @
70802354
...
...
@@ -62,7 +62,7 @@ def nms_fastrcnn_results(boxes, probs):
continue
probs_k
=
probs
[
ids
,
klass
]
.
flatten
()
boxes_k
=
boxes
[
ids
,
:]
selected_ids
=
nms_func
(
boxes_k
[:,
[
1
,
0
,
3
,
2
]]
,
probs_k
)
selected_ids
=
nms_func
(
boxes_k
,
probs_k
)
selected_boxes
=
boxes_k
[
selected_ids
,
:]
.
copy
()
ret
.
append
(
DetectionResult
(
klass
,
selected_boxes
,
probs_k
[
selected_ids
]))
...
...
examples/GAN/GAN.py
View file @
70802354
...
...
@@ -71,8 +71,9 @@ class GANTrainer(TowerTrainer):
inputs_desc
=
model
.
get_inputs_desc
()
cbs
=
input
.
setup
(
inputs_desc
)
tower_func
=
TowerFuncWrapper
(
model
.
build_graph
,
inputs_desc
)
# we need to set towerfunc because it's a TowerTrainer,
# and only TowerTrainer supports automatic graph creation for inference during training.
tower_func
=
TowerFuncWrapper
(
model
.
build_graph
,
inputs_desc
)
with
TowerContext
(
''
,
is_training
=
True
):
tower_func
(
*
input
.
get_input_tensors
())
opt
=
model
.
get_optimizer
()
...
...
@@ -138,6 +139,7 @@ class MultiGPUGANTrainer(TowerTrainer):
input
=
StagingInput
(
input
,
list
(
range
(
nr_gpu
)))
cbs
=
input
.
setup
(
model
.
get_inputs_desc
())
# build the graph
def
get_cost
(
*
inputs
):
model
.
build_graph
(
inputs
)
return
[
model
.
d_loss
,
model
.
g_loss
]
...
...
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