Skip to content

Instantly share code, notes, and snippets.

View ReiiSky's full-sized avatar
🏠
Working for my startup (Tripantero)

Satsuki Reikaa ReiiSky

🏠
Working for my startup (Tripantero)
  • Tripantero
  • Indonesia
View GitHub Profile
@ReiiSky
ReiiSky / KernelPerceptron.py
Created August 26, 2017 09:23 — forked from jogonba2/KernelPerceptron.py
Kernel Perceptron
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Overxfl0w13 #
"""You can define more kernel functions to test its performance whenever it respect the following condition:
http://latex.codecogs.com/gif.latex?\forall i\in K(x,y)\rightarrow i\geq 0
Some examples: http://gyazo.com/3b1d3ae355c2638f5ac4d98c82c31d12 (Theme 4: representation based on kernels.) Perception (PER), DSIC-UPV)
"""
# Kernel test -> hamming distance #
@ReiiSky
ReiiSky / dA.py
Created March 23, 2018 05:13 — forked from yusugomori/dA.py
Denoising Autoencoders using numpy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Denoising Autoencoders (dA)
References :
- P. Vincent, H. Larochelle, Y. Bengio, P.A. Manzagol: Extracting and
Composing Robust Features with Denoising Autoencoders, ICML'08, 1096-1103,
2008
@ReiiSky
ReiiSky / min-char-rnn.py
Created April 19, 2018 01:39 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ReiiSky
ReiiSky / LSTM_Binary.py
Created April 27, 2018 10:15 — forked from urigoren/LSTM_Binary.py
LSTM Binary classification with Keras
from keras.layers import Dense, Dropout, LSTM, Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
import pandas as pd
import numpy as np
input_file = 'input.csv'
def load_data(test_split = 0.2):
print ('Loading data...')
@ReiiSky
ReiiSky / LSTM_Binary.py
Created April 27, 2018 10:15 — forked from urigoren/LSTM_Binary.py
LSTM Binary classification with Keras
from keras.layers import Dense, Dropout, LSTM, Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
import pandas as pd
import numpy as np
input_file = 'input.csv'
def load_data(test_split = 0.2):
print ('Loading data...')
@ReiiSky
ReiiSky / LSTM_Binary.py
Created April 27, 2018 10:15 — forked from urigoren/LSTM_Binary.py
LSTM Binary classification with Keras
from keras.layers import Dense, Dropout, LSTM, Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
import pandas as pd
import numpy as np
input_file = 'input.csv'
def load_data(test_split = 0.2):
print ('Loading data...')
@ReiiSky
ReiiSky / LSTM_Binary.py
Created April 27, 2018 10:15 — forked from urigoren/LSTM_Binary.py
LSTM Binary classification with Keras
from keras.layers import Dense, Dropout, LSTM, Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
import pandas as pd
import numpy as np
input_file = 'input.csv'
def load_data(test_split = 0.2):
print ('Loading data...')
@ReiiSky
ReiiSky / RNN.java
Created April 27, 2018 10:17 — forked from tteofili/RNN.java
min char/word-level vanilla RNN (Java, nd4j, comons-math3)
/**
* Apache License 2.0
* see https://www.apache.org/licenses/LICENSE-2.0
*/
import org.apache.commons.math3.distribution.EnumeratedDistribution;
import org.apache.commons.math3.util.Pair;
import org.nd4j.linalg.api.iter.NdIndexIterator;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ops.impl.transforms.SetRange;
import org.nd4j.linalg.api.ops.impl.transforms.SoftMax;
@ReiiSky
ReiiSky / ResNeXt_gan.py
Created May 6, 2018 12:52 — forked from mjdietzx/ResNeXt_gan.py
Keras/tensorflow implementation of GAN architecture where generator and discriminator networks are ResNeXt.
from keras import layers
from keras import models
import tensorflow as tf
#
# generator input params
#
rand_dim = (1, 1, 2048) # dimension of the generator's input tensor (gaussian noise)
@ReiiSky
ReiiSky / truncated_backprop_tf.py
Created May 13, 2018 12:19 — forked from InnerPeace-Wu/truncated_backprop_tf.py
Implementation of truncated backpropagation through time in rnn with tensorflow.
import tensorflow as tf
class testCell(tf.nn.rnn_cell.RNNCell):
def __init__(self, input_size=1, state_size=1):
self.input_size = input_size
self._state_size = state_size
@property
def state_size(self):