Commit a46de342 authored by Yuxin Wu's avatar Yuxin Wu

docs update; use abstract sockets for a3c

parent 35a701c0
...@@ -251,11 +251,11 @@ send_dataflow_zmq(df, 'tcp://1.2.3.4:8877') ...@@ -251,11 +251,11 @@ send_dataflow_zmq(df, 'tcp://1.2.3.4:8877')
```python ```python
# Training Machine, process 1-10: # Training Machine, process 1-10:
df = MyLargeData() df = MyLargeData()
send_dataflow_zmq(df, 'ipc:///tmp/ipc-socket') send_dataflow_zmq(df, 'ipc://@my-socket')
``` ```
```python ```python
# Training Machine, training process # Training Machine, training process
df = RemoteDataZMQ('ipc:///tmp/ipc-socket', 'tcp://0.0.0.0:8877') df = RemoteDataZMQ('ipc://@my-socket', 'tcp://0.0.0.0:8877')
TestDataSpeed(df).start() TestDataSpeed(df).start()
``` ```
......
...@@ -174,7 +174,7 @@ if __name__ == '__main__': ...@@ -174,7 +174,7 @@ if __name__ == '__main__':
client.memory = [] client.memory = []
client.state = 0 client.state = 0
name = 'ipc://whatever' name = 'ipc://@whatever'
procs = [NaiveSimulator(k, name) for k in range(10)] procs = [NaiveSimulator(k, name) for k in range(10)]
[k.start() for k in procs] [k.start() for k in procs]
......
...@@ -233,9 +233,8 @@ def train(): ...@@ -233,9 +233,8 @@ def train():
# setup simulator processes # setup simulator processes
name_base = str(uuid.uuid1())[:6] name_base = str(uuid.uuid1())[:6]
PIPE_DIR = os.environ.get('TENSORPACK_PIPEDIR', '.').rstrip('/') namec2s = 'ipc://@sim-c2s-{}'.format(name_base)
namec2s = 'ipc://{}/sim-c2s-{}'.format(PIPE_DIR, name_base) names2c = 'ipc://@sim-s2c-{}'.format(name_base)
names2c = 'ipc://{}/sim-s2c-{}'.format(PIPE_DIR, name_base)
procs = [MySimulatorWorker(k, namec2s, names2c) for k in range(SIMULATOR_PROC)] procs = [MySimulatorWorker(k, namec2s, names2c) for k in range(SIMULATOR_PROC)]
ensure_proc_terminate(procs) ensure_proc_terminate(procs)
start_proc_mask_signal(procs) start_proc_mask_signal(procs)
......
...@@ -63,7 +63,8 @@ MaskRCNN results contain both bbox and segm mAP. ...@@ -63,7 +63,8 @@ MaskRCNN results contain both bbox and segm mAP.
The two 360k models have identical configurations with The two 360k models have identical configurations with
`R50-C4-2x` configuration in `R50-C4-2x` configuration in
[Detectron Model Zoo](https://github.com/facebookresearch/Detectron/blob/master/MODEL_ZOO.md#end-to-end-faster--mask-r-cnn-baselines). [Detectron Model Zoo](https://github.com/facebookresearch/Detectron/blob/master/MODEL_ZOO.md#end-to-end-faster--mask-r-cnn-baselines).
They get the __same performance__ with the official models, and are about 14% slower than the official implementation, due to the lack of specialized ops. They get the __same performance__ with the official models, and are about 14% slower than the official implementation,
probably due to the lack of specialized ops in TensorFlow.
## Notes ## Notes
......
...@@ -168,7 +168,7 @@ if __name__ == '__main__': ...@@ -168,7 +168,7 @@ if __name__ == '__main__':
args = parser.parse_args() args = parser.parse_args()
# tcp addr like "tcp://127.0.0.1:8877" # tcp addr like "tcp://127.0.0.1:8877"
# ipc addr like "ipc:///tmp/ipc-test" # ipc addr like "ipc://@ipc-test"
if args.task == 'send': if args.task == 'send':
# use random=True to make it slow and cpu-consuming # use random=True to make it slow and cpu-consuming
ds = FakeData([(128, 244, 244, 3)], 1000, random=True) ds = FakeData([(128, 244, 244, 3)], 1000, random=True)
......
...@@ -216,6 +216,9 @@ def add_moving_summary(*args, **kwargs): ...@@ -216,6 +216,9 @@ def add_moving_summary(*args, **kwargs):
# allow ctx to be none # allow ctx to be none
if ctx is not None and not ctx.is_main_training_tower: if ctx is not None and not ctx.is_main_training_tower:
return [] return []
if tf.get_variable_scope().reuse is True:
logger.warn("add_moving_summary() called under reuse=True scope, ignored.")
return []
if not isinstance(args[0], list): if not isinstance(args[0], list):
v = args v = args
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment