knorth55's memo

Technical memo by @knorth55

2018-06-27から1日間の記事一覧

Get matched list quickly in python

If you do not consider the list order, it is better to use set and & operator. a = [1, 2, 3] b = [2, 3, 4] c = sorted(list(set(a) & set(b))) stackoverflow.com

Specify GPU devices on ChainerMN

Use CUDA_VISIBLE_DEVICES environment variable as below. CUDA_VISIBLE_DEVICES=0,2,3 mpiexec -n 3 python train.py https://devtalk.nvidia.com/default/topic/509221/specifying-gpu-device-using-openmpi-mpirun/