Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Mar 24, 2021
1 parent d377a22 commit f34a404
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ import torch
from halonet_pytorch import HaloAttention

attn = HaloAttention(
dim = 512,
fmap_size = 32,
block_size = 8,
halo_size = 4
dim = 512, # dimension of feature map
fmap_size = 32, # feature map height and width
block_size = 8, # neighborhood block size (feature map must be divisible by this)
halo_size = 4, # halo size (block receptive field)
dim_head = 64, # dimension of each head
heads = 4 # number of attention heads
).cuda()

fmap = torch.randn(1, 512, 32, 32).cuda()
Expand Down

0 comments on commit f34a404

Please sign in to comment.