Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrej karpathy

View GitHub Profile
View bad_grad_viz.py
from graphviz import Digraph
import torch
from torch.autograd import Variable, Function
def iter_graph(root, callback):
queue = [root]
seen = set()
while queue:
fn = queue.pop()
if fn in seen:
@syhw
syhw / dnn.py
Last active Sep 15, 2020
A simple deep neural network with or w/o dropout in one file.
View dnn.py
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@BennettSmith
BennettSmith / ..build-protbuf-2.5.0.md
Last active Mar 30, 2020
Script used to build Google Protobuf 2.5.0 for use with Xcode 5 / iOS 7. Builds all supported architectures and produces a universal binary static library.
View ..build-protbuf-2.5.0.md

Google Protobuf 2.5.0 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.

Get the Script

The easiest way to use this script is to simply clone the gist onto your

You can’t perform that action at this time.