This file contains hidden or 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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or 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.autograd import Function | |
from torch._thnn import type2backend | |
from torch.nn.modules.utils import _pair | |
update_output_name = 'SpatialConvolutionLocal_updateOutput' | |
grad_input_name = 'SpatialConvolutionLocal_updateGradInput' | |
grad_params_name = 'SpatialConvolutionLocal_accGradParameters' | |
class Conv2dLocal(Function): |
This file contains hidden or 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
# Inspired by Alfredo Canziani (http://tinyurl.com/CortexNet/) | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as f | |
import torch.nn.init as init | |
from torch.autograd import Variable | |
class ConvGRUCell(nn.Module): | |
""" |