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 | |
from torch import nn | |
import torch.nn.functional as F | |
class Generator(nn.Module): | |
def __init__(self, n_classes): | |
super().__init__() | |
self.linear = nn.Sequential( | |
nn.Linear(100 + n_classes, 768), | |
nn.ReLU(True) |
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 | |
from torch import nn | |
class Generator(nn.Module): | |
def __init__(self): | |
super().__init__() | |
self.linear = nn.Sequential( | |
nn.Linear(110, 384), | |
nn.ReLU(True) | |
) |
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 | |
from torch import nn | |
import torch.nn.functional as F | |
import torchvision | |
from torchvision import transforms | |
from tqdm import tqdm | |
import statistics | |
import os | |
import pickle | |
import glob |
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 torchvision | |
from torchvision import transforms | |
from PIL import Image, ImageFilter | |
import numpy as np | |
from tqdm import tqdm | |
import glob | |
import os | |
def preprocess(n_validation=2048): |
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 | |
from torch import nn | |
import torchvision | |
import torchvision.transforms as transforms | |
import numpy as np | |
from tqdm import tqdm | |
import os | |
import pickle | |
import statistics |
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 | |
from torch import nn | |
import torchvision | |
import torchvision.transforms as transforms | |
import numpy as np | |
from tqdm import tqdm | |
import os | |
import pickle | |
import statistics |
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
__________________________________________________________________________________________________ | |
Layer (type) Output Shape Param # Connected to | |
================================================================================================== | |
input_1 (InputLayer) (None, 32, 32, 3) 0 | |
__________________________________________________________________________________________________ | |
conv2d_2 (Conv2D) (None, 32, 32, 16) 64 input_1[0][0] | |
__________________________________________________________________________________________________ | |
batch_normalization_v1_2 (Batch (None, 32, 32, 16) 64 conv2d_2[0][0] | |
__________________________________________________________________________________________________ | |
activation_2 (Activation) (None, 32, 32, 16) 0 batch_normalization_v1_2[0][0] |
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
from pelee_net import PeleeNet | |
import tensorflow as tf | |
import tensorflow.keras as keras | |
import numpy as np | |
from PIL import Image | |
import pickle | |
import os | |
from tensorflow.contrib.tpu.python.tpu import keras_support | |
def generator(X, y, batch_size, use_augmentation, shuffle, scale): |
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 | |
from torch.autograd import Variable | |
from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors | |
# https://github.com/NVIDIA/apex/blob/master/apex/fp16_utils/fp16util.py | |
class tofp16(nn.Module): | |
""" | |
Utility module that implements:: |
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.optim as optim | |
import torchvision | |
import torchvision.transforms as transforms | |
from pytorch_models import Layer10CNN, WideResNet | |
from apex import amp | |
import numpy as np | |
import datetime | |
import time | |
import pickle |