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 | |
from torchvision.models import vgg16, vgg16_bn, vgg19, vgg19_bn | |
class PerceptualLoss(nn.Module): | |
def __init__(self, arch, indices, weights, normalize=True, min_max=(-1, 1)): | |
super().__init__() | |
vgg = ( |
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 | |
from torchvision.models import vgg16, vgg16_bn, vgg19, vgg19_bn | |
class PerceptualLoss(nn.Module): | |
def __init__(self, arch, indices, weights, normalize=True, min_max=(-1, 1)): | |
super().__init__() | |
vgg = ( |
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 torch import nn | |
from torch.nn import init | |
from torch.nn import functional as F | |
def init_conv(conv, glu=True): | |
init.kaiming_normal(conv.weight) | |
if conv.bias is not None: | |
conv.bias.data.zero_() | |
class ConvBlock(nn.Module): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 vislog import Logger | |
from time import sleep | |
import numpy as np | |
import shutil | |
log = Logger('test') | |
brown1 = log.line('brown1') | |
brown2 = log.line('brown2') | |
image1 = log.image('image1') |
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 | |
from torch.autograd import Variable | |
class AdaptiveSoftmax(nn.Module): | |
def __init__(self, input_size, cutoff): | |
super().__init__() | |
self.input_size = input_size | |
self.cutoff = cutoff |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mathology</title> | |
<style> | |
body { | |
font-family: Arial, Helvetica, sans-serif; | |
} |