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
2fb8f750
Commit
2fb8f750
authored
Apr 18, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable callbacks.setter, make it a property
parent
a26226f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
examples/GAN/DCGAN.py
examples/GAN/DCGAN.py
+1
-1
tensorpack/train/config.py
tensorpack/train/config.py
+6
-2
No files found.
examples/GAN/DCGAN.py
View file @
2fb8f750
...
@@ -124,7 +124,7 @@ def get_config():
...
@@ -124,7 +124,7 @@ def get_config():
dataflow
=
get_data
(
opt
.
data
),
dataflow
=
get_data
(
opt
.
data
),
callbacks
=
[
ModelSaver
()],
callbacks
=
[
ModelSaver
()],
steps_per_epoch
=
300
,
steps_per_epoch
=
300
,
max_epoch
=
1
00
,
max_epoch
=
2
00
,
)
)
...
...
tensorpack/train/config.py
View file @
2fb8f750
...
@@ -94,8 +94,8 @@ class TrainConfig(object):
...
@@ -94,8 +94,8 @@ class TrainConfig(object):
MovingAverageSummary
(),
MovingAverageSummary
(),
ProgressBar
(),
ProgressBar
(),
MergeAllSummaries
()]
MergeAllSummaries
()]
self
.
callbacks
=
callbacks
+
extra_callbacks
self
.
_
callbacks
=
callbacks
+
extra_callbacks
assert_type
(
self
.
callbacks
,
list
)
assert_type
(
self
.
_
callbacks
,
list
)
if
monitors
is
None
:
if
monitors
is
None
:
monitors
=
[
TFSummaryWriter
(),
JSONWriter
(),
ScalarPrinter
()]
monitors
=
[
TFSummaryWriter
(),
JSONWriter
(),
ScalarPrinter
()]
...
@@ -170,6 +170,10 @@ class TrainConfig(object):
...
@@ -170,6 +170,10 @@ class TrainConfig(object):
def
nr_tower
(
self
,
value
):
def
nr_tower
(
self
,
value
):
self
.
tower
=
list
(
range
(
value
))
self
.
tower
=
list
(
range
(
value
))
@
property
def
callbacks
(
self
):
# disable setter
return
self
.
_callbacks
@
property
@
property
def
optimizer
(
self
):
def
optimizer
(
self
):
""" for back-compatibilty only. will remove in the future"""
""" for back-compatibilty only. will 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