Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 23, 2021
1 parent ff44d97 commit b45c135
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions vit_pytorch/crossformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,9 @@

# helpers

def exists(val):
return val is not None

def default(val, d):
return val if exists(val) else d

def cast_tuple(val, length = 1):
return val if isinstance(val, tuple) else ((val,) * length)

def divisible_by(val, d):
return (val % d) == 0

# cross embed layer

class CrossEmbedLayer(nn.Module):
Expand Down

0 comments on commit b45c135

Please sign in to comment.