Skip to content

Instantly share code, notes, and snippets.

Avatar

Katsuya Shimabukuro katsugeneration

View GitHub Profile
View .ctags
--langdef=Swift
--langmap=Swift:+.swift
--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/
@katsugeneration
katsugeneration / skip_thoughts_word2vec.py
Created May 15, 2016
Skip-Thought Vectors を word2vec を入出力にして行う実験用コード
View skip_thoughts_word2vec.py
# 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
View bayse_fitting_sample_1.py
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.hold(False)
plt.plot(data, y, "o")
View iris_tensorflow.py
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"
IRIS_DATA_SIZE = 4
CLASS_SIZE = 3
@katsugeneration
katsugeneration / tenforflow_rnn.py
Created Aug 7, 2016
TensorFlow basic RNN sample
View tenforflow_rnn.py
import numpy as np
import tensorflow as tf
import reader
import time
class PTBModel:
@property
def optimizer(self):
return self._optimizer
@katsugeneration
katsugeneration / cnn.py
Last active Aug 24, 2017
TensorFlow Basic CNN
View cnn.py
import tensorflow as tf
import reader
from datetime import datetime
import os.path
import time
import numpy as np
# Tensorflow の cifar10 サンプルの書き換え
# 学習率を徐々に下げたり、評価時の重みは移動平均を使ったりしているがそれはやっていない
@katsugeneration
katsugeneration / viz_filter.py
Last active Aug 24, 2017
Convert image by CNN weights
View viz_filter.py
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
plt.axis('off')
img = Image.open('009_0001.jpg')
plt.imshow(img)
@katsugeneration
katsugeneration / spiralnn.ipynb
Last active Aug 27, 2017
DNN Clasifier with spiral data
View spiralnn.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.