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
7bb9ee1c
Commit
7bb9ee1c
authored
Oct 25, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
cef8ae29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
examples/GAN/GAN.py
examples/GAN/GAN.py
+3
-2
tensorpack/graph_builder/model_desc.py
tensorpack/graph_builder/model_desc.py
+1
-1
No files found.
examples/GAN/GAN.py
View file @
7bb9ee1c
...
...
@@ -68,10 +68,11 @@ class GANTrainer(TowerTrainer):
def
__init__
(
self
,
input
,
model
):
super
(
GANTrainer
,
self
)
.
__init__
()
assert
isinstance
(
model
,
GANModelDesc
),
model
cbs
=
input
.
setup
(
model
.
get_inputs_desc
())
inputs_desc
=
model
.
get_inputs_desc
()
cbs
=
input
.
setup
(
inputs_desc
)
tower_func
=
TowerFuncWrapper
(
model
.
build_graph
,
model
.
get_inputs_desc
()
)
model
.
build_graph
,
inputs_desc
)
with
TowerContext
(
''
,
is_training
=
True
):
tower_func
(
*
input
.
get_input_tensors
())
opt
=
model
.
get_optimizer
()
...
...
tensorpack/graph_builder/model_desc.py
View file @
7bb9ee1c
...
...
@@ -94,7 +94,7 @@ class ModelDescBase(object):
args (list[tf.Tensor]): a list of tensors,
that match the list of :class:`InputDesc` defined by ``_get_inputs``.
"""
if
len
(
args
)
==
0
:
if
len
(
args
)
==
1
:
arg
=
args
[
0
]
if
isinstance
(
arg
,
InputSource
):
inputs
=
arg
.
get_input_tensors
()
# remove in the future?
...
...
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