Skip to content

Commit 5578ac4

Browse files
committed
address #292
1 parent d446a41 commit 5578ac4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'vit-pytorch',
55
packages = find_packages(exclude=['examples']),
6-
version = '1.6.4',
6+
version = '1.6.5',
77
license='MIT',
88
description = 'Vision Transformer (ViT) - Pytorch',
99
long_description_content_type = 'text/markdown',

vit_pytorch/simple_vit_with_fft.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import torch
2-
from torch.fft import fft
2+
from torch.fft import fft2
33
from torch import nn
44

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

130130
x = self.to_patch_embedding(img)
131-
freqs = torch.view_as_real(fft(img))
131+
freqs = torch.view_as_real(fft2(img))
132132

133133
f = self.to_freq_embedding(freqs)
134134

0 commit comments

Comments
 (0)