Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Feb 27, 2021
1 parent a4bff84 commit 51ac409
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions big_sleep/big_sleep.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from big_sleep.ema import EMA
import torch
import torch.nn.functional as F
from torch import nn
from torch.optim import Adam

# import torchvision
from torchvision.utils import save_image

import os
Expand All @@ -14,15 +12,12 @@
from datetime import datetime
from pathlib import Path
from tqdm import tqdm, trange
# from collections import namedtuple

from big_sleep.ema import EMA
from big_sleep.resample import resample
from big_sleep.biggan import BigGAN
from big_sleep.clip import load, tokenize, normalize_image

# from einops import rearrange

from .resample import resample

assert torch.cuda.is_available(), 'CUDA must be available in order to use Deep Daze'

# graceful keyboard interrupt
Expand Down Expand Up @@ -119,8 +114,7 @@ def __init__(
image_size,
max_classes = None,
class_temperature = 2.,
ema_decay
= 0.99
ema_decay = 0.99
):
super().__init__()
assert image_size in (128, 256, 512), 'image size must be one of 128, 256, or 512'
Expand Down Expand Up @@ -176,9 +170,7 @@ def __init__(
image_size = image_size,
max_classes = max_classes,
class_temperature = class_temperature,
ema_decay
= ema_decay

ema_decay = ema_decay
)

def reset(self):
Expand Down Expand Up @@ -255,8 +247,7 @@ def __init__(
save_date_time = False,
save_best = False,
experimental_resample = False,
ema_decay
= 0.99
ema_decay = 0.99
):
super().__init__()

Expand Down
2 changes: 1 addition & 1 deletion big_sleep/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.6.0'
__version__ = '0.6.1'

0 comments on commit 51ac409

Please sign in to comment.