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 | |
def spline_2d_torch(points, Z): | |
K = 4 | |
N, _ = points.shape | |
H, W, C = Z.shape | |
coords = (torch.clamp(points, -1.0, 1.0) + 1.0) * 0.5 * (Z.shape[0] - 1) | |
vcoords = coords.type(dtype=torch.long, non_blocking=True) | |
rcoords = coords - vcoords |
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 os | |
import boto3 | |
from fnmatch import fnmatch | |
from botocore.config import Config | |
from traceback import format_exc | |
from multiprocessing import Process, Queue, Pipe | |
from concurrent.futures import ThreadPoolExecutor | |
class DownloadException(Exception): |