Skip to content

Instantly share code, notes, and snippets.

View keisukefukuda's full-sized avatar

Keisuke Fukuda keisukefukuda

View GitHub Profile
import hashlib
import sys
import numpy as np
from mpi4py import MPI
comm = MPI.COMM_WORLD
UINT32_MAX = 4294967295
INT32_MAX = 2147483647
dataset_info = {
'cifar10': {'class_lables': 10, load_func: get_cifar10},
'cifar100': {'class_lables': 100, load_func: get_cifar100},
}
if args.dataset not in dataset_info:
raise RuntimeError('Invalid dataset choice.')
class_labels = dataset_info[args.dataset]['class_labels']
@keisukefukuda
keisukefukuda / env.sh
Last active April 20, 2019 09:41
Reedbush環境での最新版Chainerのセットアップ方法
#!/bin/bash
GROUP=$(id -ng)
MYDIR=/lustre/${GROUP}/$USER
export HOME=$MYDIR
. /etc/profile.d/modules.sh
module load cuda9/9.1.85
module load anaconda3/4.3.0
Fri Apr 12 07:58:03 UTC 2019
================================================================================
In process.sh:
CUDA_VERSION = 9.0
PYTHON_VERSION = 2.7.15
OPENMPI_VERSION = 2.1.3
Chainer = https://github.com/chainer/chainer@master
CuPy = https://github.com/cupy/cupy@master
@keisukefukuda
keisukefukuda / .prototxt
Created March 12, 2019 06:05
train_pred.prototxt
name: "OctreeDecoder"
#------------------------------------------------------------------------------------------------------------
# INPUT DATA
#------------------------------------------------------------------------------------------------------------
layer {name: "octree_models" type: "OGNData"
top: "octree_model_values" top: "octree_labels"
ogn_data_param {batch_size: 4 source: "model_names.txt" preload_data: false}}
@keisukefukuda
keisukefukuda / .prototxt
Last active March 12, 2019 06:03
train_known.prototxt
name: "OctreeDecoder"
#------------------------------------------------------------------------------------------------------------
# INPUT DATA
#------------------------------------------------------------------------------------------------------------
layer {name: "octree_models" type: "OGNData"
top: "octree_model_values" top: "octree_labels"
ogn_data_param {batch_size: 4 source: "model_names.txt" preload_data: false}}
# Example output
"""
f : 0.000139 [s]
sync after f : 0.870124 [s]
f2 : 0.820720 [s]
sync after f2 : 0.000009 [s]
g : 0.821427 [s]
sync after g : 0.000004 [s]
@keisukefukuda
keisukefukuda / wildcard.c
Last active December 4, 2018 12:01
Simple recursion-based wildcard matching
/*
* Wildcard matching program in recursive algorithm.
*
* Copyright 2018 Keisuke Fukuda
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ucx configure 1.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/kfukuda/ucx/install --with-cuda=/usr/local/cuda
## --------- ##
## Platform. ##
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ucx configure 1.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/kfukuda/ucx/install --with-cuda=/usr/local/cuda
## --------- ##
## Platform. ##