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 | |
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 |
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
# Find spot. | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
# change accordingly. | |
postal_code = '60615' | |
def find_spot(): | |
headers = { |
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
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 |
OlderNewer