Skip to content

Instantly share code, notes, and snippets.

Jaemin Cho j-min

Block or report user

Report or block j-min

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danijar
danijar / blog_tensorflow_sequence_classification.py
Last active Apr 29, 2019
TensorFlow Sequence Classification
View blog_tensorflow_sequence_classification.py
# Example for my blog post at:
# https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active Feb 12, 2020
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
View how-to-install-latest-gcc-on-ubuntu-lts.txt
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@danijar
danijar / blog_tensorflow_variable_sequence_labelling.py
Last active Oct 31, 2019
TensorFlow Variable-Length Sequence Labelling
View blog_tensorflow_variable_sequence_labelling.py
# Working example for my blog post at:
# http://danijar.com/variable-sequence-lengths-in-tensorflow/
import functools
import sets
import tensorflow as tf
from tensorflow.models.rnn import rnn_cell
from tensorflow.models.rnn import rnn
def lazy_property(function):
@off99555
off99555 / Machine Learning Curriculum.md
Last active Dec 14, 2019
Machine learning resources and related artificial intelligence concepts.
View Machine Learning Curriculum.md
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active Feb 9, 2020
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
View Install NVIDIA Driver and CUDA.md
@monikkinom
monikkinom / rnn-lstm.py
Last active Sep 3, 2019
Tensorflow RNN-LSTM implementation to count number of set bits in a binary string
View rnn-lstm.py
#Source code with the blog post at http://monik.in/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow/
import numpy as np
import random
from random import shuffle
import tensorflow as tf
# from tensorflow.models.rnn import rnn_cell
# from tensorflow.models.rnn import rnn
NUM_EXAMPLES = 10000
@nikitakit
nikitakit / tf_beam_decoder.py
Last active Aug 16, 2019
Tensorflow Beam Search
View tf_beam_decoder.py
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
@ckinsey
ckinsey / chain.py
Last active Aug 19, 2018
Chain.py Builds the Markov Models from Slack
View chain.py
import json
import markovify
import re
import time
from slackclient import SlackClient
BOT_TOKEN = "insert bot token here"
View gumbel-softmax.py
def sample_gumbel(shape, eps=1e-20):
"""Sample from Gumbel(0, 1)"""
U = tf.random_uniform(shape,minval=0,maxval=1)
return -tf.log(-tf.log(U + eps) + eps)
def gumbel_softmax_sample(logits, temperature):
""" Draw a sample from the Gumbel-Softmax distribution"""
y = logits + sample_gumbel(tf.shape(logits))
return tf.nn.softmax( y / temperature)
You can’t perform that action at this time.