Skip to content

Commit

Permalink
address lucidrains#292
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Dec 23, 2023
1 parent d446a41 commit 5578ac4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'vit-pytorch',
packages = find_packages(exclude=['examples']),
version = '1.6.4',
version = '1.6.5',
license='MIT',
description = 'Vision Transformer (ViT) - Pytorch',
long_description_content_type = 'text/markdown',
Expand Down
4 changes: 2 additions & 2 deletions vit_pytorch/simple_vit_with_fft.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import torch
from torch.fft import fft
from torch.fft import fft2
from torch import nn

from einops import rearrange, reduce, pack, unpack
Expand Down Expand Up @@ -128,7 +128,7 @@ def forward(self, img):
device, dtype = img.device, img.dtype

x = self.to_patch_embedding(img)
freqs = torch.view_as_real(fft(img))
freqs = torch.view_as_real(fft2(img))

f = self.to_freq_embedding(freqs)

Expand Down

0 comments on commit 5578ac4

Please sign in to comment.