Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn | |
class RNNCell(nn.Module): | |
def __init__(self, hidden_size, dropout, activation=None): | |
super(RNNCell, self).__init__() | |
self.hidden_size = hidden_size | |
self.activation = activation | |
linear_transform = nn.Linear(hidden_size * 2, hidden_size) | |
torch.nn.init.orthogonal_(linear_transform.weight) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4kstogram | |
accounts-qml-module | |
acpica | |
acpid | |
adwaita-icon-theme | |
alex | |
alsa-utils | |
android-tools | |
android-udev | |
arandr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
class RNNOp(nn.Module): | |
def __init__(self, nhid, dropout=0.): | |
super(RNNOp, self).__init__() | |
self.op = nn.Sequential( | |
nn.Linear(2 * nhid, nhid), | |
nn.Tanh(), | |
nn.Dropout(dropout), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules = {'xxx': ' ','xx ': ' ', 'x ': 'x','x x':' ',' xx':'x',' x ':'x', ' x': 'x', ' ':' '} | |
initial_string = " " * 100 + "x" + " " * 100 | |
prev_string = initial_string | |
for i in range(90): | |
print(prev_string) | |
prev_string = ''.join(rules.get(prev_string[i - 1:i + 2], ' ') for i in range(len(initial_string))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import torch | |
from torch import nn | |
import hinton | |
# import numpy as np | |
DEBUG = False | |
torch.autograd.set_detect_anomaly(DEBUG) | |
if DEBUG: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import os | |
import time | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.optim.lr_scheduler as lr_scheduler |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.