Skip to content

Instantly share code, notes, and snippets.

View katsugeneration's full-sized avatar

Katsuya Shimabukuro katsugeneration

View GitHub Profile
katsugeneration / spiralnn.ipynb
Last active August 27, 2017 12:49
DNN Clasifier with spiral data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
katsugeneration /
Last active August 24, 2017 15:53
Convert image by CNN weights
import numpy as np
from scipy.ndimage import convolve
import tensorflow as tf
from tensorflow import pywrap_tensorflow
from PIL import Image
from matplotlib import pyplot as plt
img ='009_0001.jpg')
katsugeneration /
Last active August 24, 2017 15:54
TensorFlow Basic CNN
import tensorflow as tf
import reader
from datetime import datetime
import os.path
import time
import numpy as np
# Tensorflow の cifar10 サンプルの書き換え
# 学習率を徐々に下げたり、評価時の重みは移動平均を使ったりしているがそれはやっていない
katsugeneration /
Created August 7, 2016 09:40
TensorFlow basic RNN sample
import numpy as np
import tensorflow as tf
import reader
import time
class PTBModel:
def optimizer(self):
return self._optimizer
katsugeneration /
Created July 18, 2016 07:34
TensorFlow basic DNN
import tensorflow as tf
import numpy as np
import pandas as pd
import math
# Data sets
IRIS_TRAINING = "iris_training.csv"
IRIS_TEST = "iris_test.csv"
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
I = 100
data = np.random.normal(0, 2, I)
y = np.ones(I)
plt.plot(data, y, "o")
katsugeneration /
Created May 15, 2016 07:28
Skip-Thought Vectors を word2vec を入出力にして行う実験用コード
# coding:utf-8
import chainer
from chainer import cuda
import chainer.links as L
import chainer.functions as F
from chainer import optimizers
from chainer import serializers
from chainer.functions.activation import sigmoid
--regex-swift=/(var|let)[ \t]+([^:=]+).*$/\2/,variable/
--regex-swift=/func[ \t]+([^\(\)]+)\([^\(\)]*\)/\1/,function/
--regex-swift=/class[ \t]+([^:\{]+).*$/\1/,class/
--regex-swift=/protocol[ \t]+([^:\{]+).*$/\1/,protocol/