Skip to content

Commit

Permalink
clean up publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Feb 27, 2024
1 parent aa08039 commit 2320bf5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
3 changes: 0 additions & 3 deletions featup/adaptive_conv_cuda/adaptive_conv.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import math
from torch import nn
from torch.autograd import Function
import torch
import time

from featup.adaptive_conv_cuda import cuda_impl

Expand Down
16 changes: 8 additions & 8 deletions featup/train_jbu_upsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
from torch.utils.data import DataLoader
from torchvision.transforms import InterpolationMode

from datasets.JitteredImage import apply_jitter, sample_transform
from datasets.util import get_dataset, SingleImageDataset
from downsamplers import SimpleDownsampler, AttentionDownsampler
from featurizers.util import get_featurizer
from layers import ChannelNorm
from losses import TVLoss, SampledCRFLoss, entropy
from upsamplers import get_upsampler
from util import pca, RollingAvg, unnorm, norm, prep_image
from featup.datasets.JitteredImage import apply_jitter, sample_transform
from featup.datasets.util import get_dataset, SingleImageDataset
from featup.downsamplers import SimpleDownsampler, AttentionDownsampler
from featup.featurizers.util import get_featurizer
from featup.layers import ChannelNorm
from featup.losses import TVLoss, SampledCRFLoss, entropy
from featup.upsamplers import get_upsampler
from featup.util import pca, RollingAvg, unnorm, norm, prep_image

torch.multiprocessing.set_sharing_strategy('file_system')

Expand Down
6 changes: 3 additions & 3 deletions featup/train_probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from torch.utils.data import DataLoader
from torchmetrics.classification import Accuracy, JaccardIndex

from datasets.COCO import Coco
from datasets.EmbeddingFile import EmbeddingFile
from losses import ScaleAndShiftInvariantLoss
from featup.datasets.COCO import Coco
from featup.datasets.EmbeddingFile import EmbeddingFile
from featup.losses import ScaleAndShiftInvariantLoss
from featup.util import pca
from featup.util import remove_axes

Expand Down
2 changes: 1 addition & 1 deletion featup/upsamplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.ops import CARAFEPack
from timm.models.layers import trunc_normal_

from featup.adaptive_conv_cuda.adaptive_conv import AdaptiveConv
Expand Down Expand Up @@ -143,6 +142,7 @@ class CarafeUpsampler(torch.nn.Module):

def __init__(self, dim, kernel_size, *args, **kwargs):
super().__init__(*args, **kwargs)
from mmcv.ops import CARAFEPack
self.up1 = CARAFEPack(dim, up_kernel=3, up_group=1, scale_factor=2)
self.up2 = CARAFEPack(dim, up_kernel=3, up_group=1, scale_factor=2)
self.up3 = CARAFEPack(dim, up_kernel=3, up_group=1, scale_factor=2)
Expand Down
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
packages=find_packages(),
install_requires=[
'torch',
'kornia',
'omegaconf',
'pytorch-lightning',
'torchvision',
'tqdm',
'torchemetrics',
'sklearn',
'numpy',
'matplotlib',
'glob',

],
author='Mark Hamilton, Stephanie Fu',
author_email='[email protected], [email protected]',
Expand Down

0 comments on commit 2320bf5

Please sign in to comment.