As configured in my dotfiles.
start new:
tmux
start new with session name:
| # Copyright 2017 Uber Technologies, Inc. All Rights Reserved. | |
| # Copyright 2016 The TensorFlow Authors. All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
| """Simple example on how to log scalars and images to tensorboard without tensor ops. | |
| License: BSD License 2.0 | |
| """ | |
| __author__ = "Michael Gygli" | |
| import tensorflow as tf | |
| from StringIO import StringIO | |
| import matplotlib.pyplot as plt | |
| import numpy as np |
| """Example of barrier implementation using TensorFlow shared variables. | |
| All workers synchronize on barrier, copy global parameters to local versions | |
| and increment global parameter variable asynchronously. Should see something | |
| like this: | |
| bash> killall python | |
| bash> python simple_barrier.py --num_workers=4 | |
| worker 0, local_param 4 global_param 5 | |
| worker 2, local_param 4 global_param 7 |
| #!/usr/bin/env python | |
| # Benchmark transferring data, part of troubleshooting https://github.com/tensorflow/tensorflow/issues/6116 | |
| # | |
| # Take a independent workers communicating with b parameter shards | |
| # Each worker tries to add to variables stored on parameter server as fast as | |
| # possible. | |
| # | |
| # macbook | |
| # ps=1: 1.6 GB/s | |
| # ps=2: 2.6 GB/s |
| # -*- coding: utf-8 -*- | |
| import requests | |
| from io import BytesIO, SEEK_SET, SEEK_END | |
| class ResponseStream(object): | |
| def __init__(self, request_iterator): | |
| self._bytes = BytesIO() | |
| self._iterator = request_iterator |
As configured in my dotfiles.
start new:
tmux
start new with session name: