diff --git a/perceiver_pytorch/perceiver_pytorch.py b/perceiver_pytorch/perceiver_pytorch.py index 0297340..ff4bb04 100644 --- a/perceiver_pytorch/perceiver_pytorch.py +++ b/perceiver_pytorch/perceiver_pytorch.py @@ -33,11 +33,11 @@ def fourier_encode(x, max_freq, num_bands = 4): x = x.unsqueeze(-1) device, dtype, orig_x = x.device, x.dtype, x - scales = torch.logspace(0., log(max_freq / 2) / log(10), num_bands, device = device, dtype = dtype) + scales = torch.linspace(1., max_freq / 2, num_bands, device = device, dtype = dtype) scales = scales[(*((None,) * (len(x.shape) - 1)), Ellipsis)] x = x * scales * pi - x = torch.cat([x.sin(), x.cos()], dim=-1) + x = torch.cat([x.sin(), x.cos()], dim = -1) x = torch.cat((x, orig_x), dim = -1) return x diff --git a/setup.py b/setup.py index c270b67..cd111e9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = 'perceiver-pytorch', packages = find_packages(), - version = '0.7.3', + version = '0.7.4', license='MIT', description = 'Perceiver - Pytorch', author = 'Phil Wang',