Skip to content

Instantly share code, notes, and snippets.

View ruotianluo's full-sized avatar

Ruotian(RT) Luo ruotianluo

View GitHub Profile
import torch
import torch.nn as nn
class involution(torch.nn.Module):
def __init__(self):
super().__init__()
self.K = K = 3
self.C = C = 256
self.r = r = 64
self.G = G = 64
@ruotianluo
ruotianluo / find_ipad_slot.py
Created July 6, 2021 17:54
find_ipad_slot(pick up)
# Find spot.
from bs4 import BeautifulSoup
import requests
import json
# change accordingly.
postal_code = '60615'
def find_spot():
headers = {
class InfiniteConcatDistributedSampler(DistributedSampler):
def __init__(self, *args, **kwargs):
"""
Args:
global_batch_size: since infinite indices will wrap,
so it is possible that same images in one batch.
We apply drop_last here in the sampler.
determistic: we always start the generator with seed 0,
and then to restart from certain iteration, we just