Skip to content

Instantly share code, notes, and snippets.

View katerakelly's full-sized avatar

Kate Rakelly katerakelly

View GitHub Profile
@katerakelly
katerakelly / extract_files.sh
Created December 4, 2019 17:43
Extract camera-ready submission pdfs from directory downloaded from CMT
#!/bin/bash
d=$CAMERA_READY_DIR
for i in {1..100}
do
if [ -d "$d/$i" ]
then
echo $i
@katerakelly
katerakelly / comparison.py
Last active October 18, 2021 17:00
pytorch-upsampling
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from torch.autograd import Variable
def make_bilinear_weights(size, num_channels):
''' Make a 2D bilinear kernel suitable for upsampling
Stack the bilinear kernel for application to tensor '''
factor = (size + 1) // 2