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
#!/bin/bash | |
d=$CAMERA_READY_DIR | |
for i in {1..100} | |
do | |
if [ -d "$d/$i" ] | |
then | |
echo $i |
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 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 |