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
540cdf7c
Commit
540cdf7c
authored
Nov 26, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc import fix
parent
59dd1aa5
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
22 additions
and
22 deletions
+22
-22
examples/Atari2600/atari.py
examples/Atari2600/atari.py
+1
-1
examples/Atari2600/common.py
examples/Atari2600/common.py
+1
-2
examples/OpenAIGym/train-atari.py
examples/OpenAIGym/train-atari.py
+1
-2
examples/ResNet/imagenet-resnet.py
examples/ResNet/imagenet-resnet.py
+1
-1
examples/ResNet/load-resnet.py
examples/ResNet/load-resnet.py
+1
-1
tensorpack/RL/expreplay.py
tensorpack/RL/expreplay.py
+2
-3
tensorpack/RL/gymenv.py
tensorpack/RL/gymenv.py
+3
-3
tensorpack/RL/simulator.py
tensorpack/RL/simulator.py
+3
-3
tensorpack/callbacks/group.py
tensorpack/callbacks/group.py
+1
-1
tensorpack/callbacks/inference.py
tensorpack/callbacks/inference.py
+1
-1
tensorpack/callbacks/stats.py
tensorpack/callbacks/stats.py
+0
-0
tensorpack/dataflow/prefetch.py
tensorpack/dataflow/prefetch.py
+5
-2
tensorpack/predict/concurrency.py
tensorpack/predict/concurrency.py
+1
-1
tensorpack/utils/stats.py
tensorpack/utils/stats.py
+0
-0
tensorpack/utils/timer.py
tensorpack/utils/timer.py
+1
-1
No files found.
examples/Atari2600/atari.py
View file @
540cdf7c
...
...
@@ -11,7 +11,7 @@ import threading
import
six
from
six.moves
import
range
from
tensorpack.utils
import
(
get_rng
,
logger
,
get_dataset_path
,
execute_only_once
)
from
tensorpack.utils.stat
import
StatCounter
from
tensorpack.utils.stat
s
import
StatCounter
from
tensorpack.RL.envbase
import
RLEnvironment
,
DiscreteActionSpace
...
...
examples/Atari2600/common.py
View file @
540cdf7c
...
...
@@ -11,8 +11,7 @@ from six.moves import queue
from
tensorpack
import
*
from
tensorpack.predict
import
get_predict_func
from
tensorpack.utils.concurrency
import
*
from
tensorpack.utils.stat
import
*
from
tensorpack.callbacks
import
*
from
tensorpack.utils.stats
import
*
global
get_player
get_player
=
None
...
...
examples/OpenAIGym/train-atari.py
View file @
540cdf7c
...
...
@@ -17,8 +17,7 @@ from six.moves import queue
from
tensorpack
import
*
from
tensorpack.utils.concurrency
import
*
from
tensorpack.utils.serialize
import
*
from
tensorpack.utils.timer
import
*
from
tensorpack.utils.stat
import
*
from
tensorpack.utils.stats
import
*
from
tensorpack.tfutils
import
symbolic_functions
as
symbf
from
tensorpack.RL
import
*
...
...
examples/ResNet/imagenet-resnet.py
View file @
540cdf7c
...
...
@@ -13,7 +13,7 @@ import multiprocessing
import
tensorflow
as
tf
from
tensorflow.contrib.layers
import
variance_scaling_initializer
from
tensorpack
import
*
from
tensorpack.utils.stat
import
RatioCounter
from
tensorpack.utils.stat
s
import
RatioCounter
from
tensorpack.tfutils.symbolic_functions
import
*
from
tensorpack.tfutils.summary
import
*
...
...
examples/ResNet/load-resnet.py
View file @
540cdf7c
...
...
@@ -15,7 +15,7 @@ from tensorflow.contrib.layers import variance_scaling_initializer
from
tensorpack
import
*
from
tensorpack.utils
import
logger
from
tensorpack.utils.stat
import
RatioCounter
from
tensorpack.utils.stat
s
import
RatioCounter
from
tensorpack.tfutils.symbolic_functions
import
*
from
tensorpack.tfutils.summary
import
*
from
tensorpack.dataflow.dataset
import
ILSVRCMeta
...
...
tensorpack/RL/expreplay.py
View file @
540cdf7c
...
...
@@ -6,12 +6,11 @@
import
numpy
as
np
from
collections
import
deque
,
namedtuple
import
threading
from
tqdm
import
tqdm
import
six
from
six.moves
import
queue
from
..dataflow
import
DataFlow
from
..utils
import
*
from
..utils
import
logger
,
get_tqdm
from
..utils.concurrency
import
LoopThread
from
..callbacks.base
import
Callback
...
...
@@ -71,7 +70,7 @@ class ExpReplay(DataFlow, Callback):
self
.
_populate_exp
()
self
.
exploration
=
old_exploration
with
tqdm
(
total
=
self
.
init_memory_size
)
as
pbar
:
with
get_
tqdm
(
total
=
self
.
init_memory_size
)
as
pbar
:
while
len
(
self
.
mem
)
<
self
.
init_memory_size
:
self
.
_populate_exp
()
pbar
.
update
()
...
...
tensorpack/RL/gymenv.py
View file @
540cdf7c
...
...
@@ -19,8 +19,8 @@ except ImportError:
import
threading
from
..utils.fs
import
*
from
..utils.stat
import
*
from
..utils.fs
import
mkdir_p
from
..utils.stat
s
import
StatCounter
from
.envbase
import
RLEnvironment
,
DiscreteActionSpace
...
...
@@ -77,7 +77,7 @@ if __name__ == '__main__':
env
=
GymEnv
(
'Breakout-v0'
,
viz
=
0.1
)
num
=
env
.
get_action_space
()
.
num_actions
()
from
..utils
import
*
from
..utils
import
get_rng
rng
=
get_rng
(
num
)
while
True
:
act
=
rng
.
choice
(
range
(
num
))
...
...
tensorpack/RL/simulator.py
View file @
540cdf7c
...
...
@@ -19,9 +19,9 @@ from ..callbacks import Callback
from
..tfutils.varmanip
import
SessionUpdate
from
..predict
import
OfflinePredictor
from
..utils
import
logger
from
..utils.timer
import
*
from
..utils.serialize
import
*
from
..utils.concurrency
import
*
#
from ..utils.timer import *
from
..utils.serialize
import
loads
,
dumps
from
..utils.concurrency
import
LoopThread
,
ensure_proc_terminate
__all__
=
[
'SimulatorProcess'
,
'SimulatorMaster'
,
'SimulatorProcessStateExchange'
,
'SimulatorProcessSharedWeight'
,
...
...
tensorpack/callbacks/group.py
View file @
540cdf7c
...
...
@@ -7,7 +7,7 @@ from contextlib import contextmanager
import
time
from
.base
import
Callback
from
.stat
import
StatPrinter
from
.stat
s
import
StatPrinter
from
..utils
import
logger
__all__
=
[
'Callbacks'
]
...
...
tensorpack/callbacks/inference.py
View file @
540cdf7c
...
...
@@ -11,7 +11,7 @@ from six.moves import zip, map
from
..dataflow
import
DataFlow
from
..utils
import
get_tqdm
,
logger
,
execute_only_once
from
..utils.stat
import
RatioCounter
,
BinaryStatistics
from
..utils.stat
s
import
RatioCounter
,
BinaryStatistics
from
..tfutils
import
get_op_tensor_name
,
get_op_var_name
from
.base
import
Callback
from
.dispatcher
import
OutputTensorDispatcer
...
...
tensorpack/callbacks/stat.py
→
tensorpack/callbacks/stat
s
.py
View file @
540cdf7c
File moved
tensorpack/dataflow/prefetch.py
View file @
540cdf7c
...
...
@@ -12,7 +12,8 @@ import uuid
import
os
from
.base
import
ProxyDataFlow
from
..utils.concurrency
import
*
from
..utils.concurrency
import
(
ensure_proc_terminate
,
mask_sigint
,
start_proc_mask_signal
)
from
..utils.serialize
import
loads
,
dumps
from
..utils
import
logger
from
..utils.gpu
import
change_gpu
...
...
@@ -82,6 +83,7 @@ class PrefetchData(ProxyDataFlow):
pass
def
BlockParallel
(
ds
,
queue_size
):
# TODO more doc
"""
Insert `BlockParallel` in dataflow pipeline to block parallelism on ds
...
...
@@ -170,7 +172,8 @@ class PrefetchDataZMQ(ProxyDataFlow):
pass
class
PrefetchOnGPUs
(
PrefetchDataZMQ
):
""" Prefetch with each process having a specific CUDA_VISIBLE_DEVICES"""
""" Prefetch with each process having a specific CUDA_VISIBLE_DEVICES
variable"""
def
__init__
(
self
,
ds
,
gpus
,
pipedir
=
None
):
self
.
gpus
=
gpus
super
(
PrefetchOnGPUs
,
self
)
.
__init__
(
ds
,
len
(
gpus
),
pipedir
)
...
...
tensorpack/predict/concurrency.py
View file @
540cdf7c
...
...
@@ -13,7 +13,7 @@ from ..utils.concurrency import DIE
from
..tfutils.modelutils
import
describe_model
from
..utils
import
logger
from
.base
import
*
from
.base
import
OfflinePredictor
,
AsyncPredictorBase
try
:
if
six
.
PY2
:
...
...
tensorpack/utils/stat.py
→
tensorpack/utils/stat
s
.py
View file @
540cdf7c
File moved
tensorpack/utils/timer.py
View file @
540cdf7c
...
...
@@ -10,7 +10,7 @@ from collections import defaultdict
import
six
import
atexit
from
.stat
import
StatCounter
from
.stat
s
import
StatCounter
from
.
import
logger
__all__
=
[
'total_timer'
,
'timed_operation'
,
...
...
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