Skip to content

Instantly share code, notes, and snippets.

View flaport's full-sized avatar

Floris Laporte flaport

View GitHub Profile
@flaport
flaport / torch_rnn.py
Last active September 13, 2018 15:59
simple pytorch rnn
class RNN(torch.nn.Module):
''' Simple pure-pytorch RNN implementation '''
def __init__(self, input_size, hidden_size, batch_first=False):
super(RNN, self).__init__()
self.hidden_size = hidden_size
self.batch_first = batch_first
self.input_layer = torch.nn.Linear(input_size, hidden_size, bias=False)
self.hidden_layer = torch.nn.Linear(hidden_size, hidden_size, bias=True)
self.activation = torch.nn.Tanh()
@flaport
flaport / klayout.sh
Last active December 18, 2024 23:39
Building KLayout on Ubuntu
# This file automates the build and install instructions for klayout (http://www.klayout.de) on Ubuntu.
# run this file as follows:
# source klayout.sh
# go to home folder
cd ~
# install dependencies
sudo apt-get --yes --force-yes install build-essential