This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# pre-pull images into each node with "pulling concurrency control" #} | |
{% set image = "your_repo/your_image:your_tag" %} | |
{% set docker_registry_credential = "your-cred" %} | |
{% set node_key = "type" %} | |
{% set node_value = "cpu" %} | |
{% set n_nodes = 1 %} | |
{# this concurrency number can be gradually changed afterwards, by using, e.g., k edit your_replicaset #} | |
kind: ReplicaSet | |
apiVersion: extensions/v1beta1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### dev-horovod | |
python run_experiment_mm_raw.py \ | |
--workers_csv_path=sandbox/a_2.csv \ | |
--level_name=PongNoFrameskip-v4 \ | |
--batch_size=32 \ | |
--entropy_cost=0.0033391318945337044 \ | |
--learning_rate=0.00031 \ | |
--total_environment_frames=10000000000 \ | |
--reward_clipping=soft_asymmetric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# learner | |
python experiment.py \ | |
--job_name=learner --task=0 \ | |
--num_actors=1 \ | |
--level_name=dmlab30 --batch_size=2 \ | |
--entropy_cost=0.0033391318945337044 \ | |
--learning_rate=0.00031866995608948655 \ | |
--total_environment_frames=1000 \ | |
--reward_clipping=soft_asymmetric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Minimal example to run scii with raw api. | |
First, cd to the sc2 binary dir and run command: | |
./SC2_x64 -listen 127.0.0.1 -port 5000 | |
Then, run this script in another terminal. | |
""" | |
from s2clientprotocol import common_pb2 as sc_common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright 2017 Google Inc. | |
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 | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright 2017 Google Inc. | |
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 | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require'cunn' | |
require'cudnn' | |
--V = 30000 + 1 -- vocabulary size | |
--C = 500 | |
--M = 80 -- seq length | |
--B = 100 -- #batches | |
--padVocabInd = 1 | |
--MP = M * p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__global__ void OHNN_CudaLookupTable2_updateOutput_kernel( | |
float *inputInd, float *weight, int weightStride, int B, int M, int V, int C, | |
float *output, int outputStride) | |
{ | |
int iFet = blockIdx.x * blockDim.x + threadIdx.x; | |
int iWord = blockIdx.y * blockDim.y + threadIdx.y; | |
if (iFet < C && iWord < B*M) { | |
int iVocab = (int)(inputInd[iWord] - 1); // C zero base <- lua one base | |
int nSrc = iVocab * weightStride + iFet; | |
int nDst = iWord * outputStride + iFet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- nn.LookupTable vs nn.SparseLinear | |
require'cunn' | |
V = 30000 -- vocabulary size | |
C = 500 -- output dim | |
B = 100*500 -- #batches | |
nloop = 3 | |
-- onehot input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove the old torch 7 | |
cd ~ | |
rm -rf torch | |
# install torch 7 with lua52 (as workaround to 2GB memory limit of luajit) | |
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash | |
git clone https://github.com/torch/distro.git ~/torch --recursive | |
cd ~/torch | |
TORCH_LUA_VERSION=LUA52 ./install.sh |