Skip to content

Instantly share code, notes, and snippets.

View hma02's full-sized avatar

He Ma hma02

  • University of Guelph
  • Canada
View GitHub Profile
@f0k
f0k / lsgan_mnist.py
Created March 7, 2017 13:22
Lasagne LSGAN example
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example employing Lasagne for digit generation using the MNIST dataset and
Least Squares Generative Adversarial Networks
(LSGANs, see https://arxiv.org/abs/1611.04076 for the paper).
It is based on a WGAN example:
https://gist.github.com/f0k/f3190ebba6c53887d598d03119ca2066
@kashif
kashif / cifar10_wide_resnet.py
Last active May 10, 2021 02:44
Keras Wide Residual Networks CIFAR-10
from __future__ import print_function
from keras.datasets import cifar10
from keras.layers import merge, Input
from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D
from keras.layers.core import Dense, Activation, Flatten, Dropout
from keras.layers.normalization import BatchNormalization
from keras.models import Model
from keras.preprocessing.image import ImageDataGenerator
from keras.utils import np_utils
@matthias-k
matthias-k / L-BFGS.ipynb
Last active March 25, 2017 22:00
draft of L-BFGS in theano
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lebedov
lebedov / mpi4py_self_spawn_multiple.py
Created May 13, 2015 21:18
How to pass an environmental variable with different values to spawned processes using MPI4PY.
#!/usr/bin/env python
"""
Self-launching MPI4PY script that uses spawning and sets an environmental
variable to different values for each of the launched script instances..
Notes
-----
Requires an MPI implementation that supports dynamic process management.
"""
@benanne
benanne / gist:ae2a7adaab133c61a059
Created January 28, 2015 13:28
Inception module in Lasagne (without 3x3s1 pooling)
import lasagne as nn
Conv2DLayer = nn.layers.Conv2DDNNLayer
def inception_module(l_in, num_1x1, reduce_3x3, num_3x3, reduce_5x5, num_5x5, gain=1.0, bias=0.1):
"""
inception module (without the 3x3s1 pooling and projection because that's difficult in Theano right now)
"""
shape = l_in.get_output_shape()
out_layers = []

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: