Reinforcement learning is a mode of machine learning driven by the feedback from the environment on how good a string of actions of the learning agent turns out to be.
We consider here a reinforcement learning mechanism for neural networks
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import sys | |
from authentication import authenticate | |
from future.moves.urllib.parse import urlencode | |
if __name__ == '__main__': | |
username = sys.argv[1] |
# BEFORE STARTING PUT libcudnn5_5.1.10-1+cuda8.0_amd64.deb AND libcudnn5-dev_5.1.10-1+cuda8.0_amd64.deb IN /tmp | |
# OTHERWISE THIS WON'T WORK | |
# This has been tested only on EC2 P2 xlarge instance with 16 GB storage and stock Ubuntu 16.04 | |
# It's a setup for a playground EC2 machine to perform workshops with Jupyter Notebook on GPU. | |
# It might contain some unnecessary crap | |
# The process takes like 15 minutes | |
pushd /tmp && | |
stat libcudnn5_5.1.10-1+cuda8.0_amd64.deb && | |
stat libcudnn5-dev_5.1.10-1+cuda8.0_amd64.deb && |
Reinforcement learning is a mode of machine learning driven by the feedback from the environment on how good a string of actions of the learning agent turns out to be.
We consider here a reinforcement learning mechanism for neural networks
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
<style type="text/css"> | |
body{ | |
font-weight: 100; | |
} | |
div.displayContainer{ | |
background: #eee; | |
padding: 10px; | |
box-shadow: inset 0 0 3px -2px #000, inset 0 6px 6px -6px #000; | |
} | |
div.displayContainer h2{ |
These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
""" | |
This is a batched LSTM forward and backward pass | |
the comment is writen by karpathy, except the comment start with #sooda: | |
#sooda: will add some comment corresponding the equtions (ref: lstm.png) | |
""" | |
import numpy as np | |
import code | |
class LSTM: | |
To install a custom package or modify an existing docker image we need to
from scipy.spatial import Delaunay, ConvexHull
import networkx as nx
points = [ [0,0],[0,50],[50,50],[50,0],[0,400],[0,450],[50,400],[50,450],[700,300],[700,350],[750,300],[750,350],
[900,600],[950,650],[950,600],[900,650]
]
def concave(points,alpha_x=150,alpha_y=250):
points = [(i[0],i[1]) if type(i) <> tuple else i for i in points]
de = Delaunay(points)
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.